add:添加医疗包

This commit is contained in:
bzx
2025-09-02 14:46:43 +08:00
parent 777db1792e
commit 532e054580
9 changed files with 17 additions and 130 deletions

View File

@@ -17,8 +17,8 @@
</intent-filter> </intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" /> <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="true" /> <meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="true" />
</activity>
<uses-permission android:name="android.permission.BLUETOOTH"/> <uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/> <uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
@@ -26,7 +26,6 @@
<uses-feature android:name="android.hardware.bluetooth" android:required="true"/> <uses-feature android:name="android.hardware.bluetooth" android:required="true"/>
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" android:usesPermissionFlags="neverForLocation"/> <uses-permission android:name="android.permission.BLUETOOTH_SCAN" android:usesPermissionFlags="neverForLocation"/>
<uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED" tools:ignore="ProtectedPermissions"/> <uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED" tools:ignore="ProtectedPermissions"/>
</activity>
</application> </application>
<!-- <uses-permission android:name="android.permission.CAMERA" /> --> <!-- <uses-permission android:name="android.permission.CAMERA" /> -->

View File

@@ -33,7 +33,6 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 1456064948316804004}
- {fileID: 2114833926489421712} - {fileID: 2114833926489421712}
- {fileID: 2975800655805278549} - {fileID: 2975800655805278549}
m_Father: {fileID: 0} m_Father: {fileID: 0}
@@ -385,122 +384,3 @@ Transform:
type: 3} type: 3}
m_PrefabInstance: {fileID: 3075520859896635531} m_PrefabInstance: {fileID: 3075520859896635531}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1001 &7079639987749470516
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 1363603555789101606}
m_Modifications:
- target: {fileID: 950877517808929759, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_Layer
value: 15
objectReference: {fileID: 0}
- target: {fileID: 1009465242357089601, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_Layer
value: 15
objectReference: {fileID: 0}
- target: {fileID: 1134369481314700721, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_Name
value: "\u67AA\u5468\u56F4\u5149\u5708\u7279\u654802"
objectReference: {fileID: 0}
- target: {fileID: 1134369481314700721, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_Layer
value: 15
objectReference: {fileID: 0}
- target: {fileID: 3638305416909078098, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_Layer
value: 15
objectReference: {fileID: 0}
- target: {fileID: 3863667168268822279, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_Layer
value: 15
objectReference: {fileID: 0}
- target: {fileID: 5682986289942542980, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_Layer
value: 15
objectReference: {fileID: 0}
- target: {fileID: 7911000408926587808, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_Layer
value: 15
objectReference: {fileID: 0}
- target: {fileID: 8059904997510323676, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_Layer
value: 15
objectReference: {fileID: 0}
- target: {fileID: 8505914673053782672, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8505914673053782672, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8505914673053782672, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8505914673053782672, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8505914673053782672, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8505914673053782672, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8505914673053782672, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8505914673053782672, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8505914673053782672, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8505914673053782672, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8630554304944364007, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
propertyPath: m_Layer
value: 15
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c62cc55b158cf004193c3770270091c9, type: 3}
--- !u!4 &1456064948316804004 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 8505914673053782672, guid: c62cc55b158cf004193c3770270091c9,
type: 3}
m_PrefabInstance: {fileID: 7079639987749470516}
m_PrefabAsset: {fileID: 0}

View File

@@ -375,8 +375,9 @@ public class GameManager : NetworkBehaviour
{ {
if(!isStart) if(!isStart)
return; return;
var item= Instantiate(itemPropPre, pos.position, Quaternion.identity); var item= Instantiate(itemPropPre);
NetworkServer.Spawn(item); NetworkServer.Spawn(item);
item.transform.position=new Vector3(pos.position.x,0.5f,pos.position.z);
item.GetComponent<ItemProp>().SetItemProp(ItemPropType.Hp); item.GetComponent<ItemProp>().SetItemProp(ItemPropType.Hp);
} }
@@ -420,7 +421,7 @@ public class GameManager : NetworkBehaviour
int totalWeight = 0; int totalWeight = 0;
int targetWeight = Random.Range(24, 27); // 24-26 int targetWeight = Random.Range(24, 27); // 24-26
int targetCount = Random.Range(4, 6); // 4-6 int targetCount = Random.Range(4, 8); // 4-7
// 随机添加怪物直到接近目标 // 随机添加怪物直到接近目标
while (monsterTypes.Count < targetCount && totalWeight < targetWeight) while (monsterTypes.Count < targetCount && totalWeight < targetWeight)
@@ -496,6 +497,7 @@ public class GameManager : NetworkBehaviour
GameObject enemy = EnemyList[id].gameObject; GameObject enemy = EnemyList[id].gameObject;
int hpItemPropIndex = 15; int hpItemPropIndex = 15;
int randomItemPropIndex = Random.Range(1, 101); int randomItemPropIndex = Random.Range(1, 101);
if(randomItemPropIndex<hpItemPropIndex) if(randomItemPropIndex<hpItemPropIndex)
CreateItemProp(enemy.transform); CreateItemProp(enemy.transform);

View File

@@ -1,6 +1,7 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using DragonLi.Core;
using Mirror; using Mirror;
using UnityEngine; using UnityEngine;
@@ -19,6 +20,10 @@ public class ItemProp : NetworkBehaviour
private void Start() private void Start()
{ {
addHpIndex = 40; addHpIndex = 40;
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
{
Collider();
}, 15f);
} }
[ClientRpc] [ClientRpc]

View File

@@ -57,7 +57,6 @@ public class WeaponProp : NetworkBehaviour
{ {
transform.DORotate(new Vector3(0f, 360f, 0f), 5f, RotateMode.LocalAxisAdd).SetLoops(-1, LoopType.Restart); transform.DORotate(new Vector3(0f, 360f, 0f), 5f, RotateMode.LocalAxisAdd).SetLoops(-1, LoopType.Restart);
} }
amount = 20; amount = 20;
} }

View File

@@ -18,7 +18,7 @@ public class TrueGearEffectManager : MonoBehaviour
GetConnectIndex = 20; GetConnectIndex = 20;
AddHitPart(); AddHitPart();
#if !UNITY_EDITOR #if !UNITY_EDITOR
TrueGearEffectManager.Ins.StartRequestTrueGear(); StartRequestTrueGear();
#endif #endif
} }

View File

@@ -206,7 +206,7 @@ AnimationClip:
m_Level: 0 m_Level: 0
m_CycleOffset: 0 m_CycleOffset: 0
m_HasAdditiveReferencePose: 0 m_HasAdditiveReferencePose: 0
m_LoopTime: 1 m_LoopTime: 0
m_LoopBlend: 0 m_LoopBlend: 0
m_LoopBlendOrientation: 0 m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0 m_LoopBlendPositionY: 0

View File

@@ -33,7 +33,7 @@ AnimatorStateMachine:
m_ChildStates: m_ChildStates:
- serializedVersion: 1 - serializedVersion: 1
m_State: {fileID: 5853152771699421339} m_State: {fileID: 5853152771699421339}
m_Position: {x: 200, y: 0, z: 0} m_Position: {x: 250, y: 20, z: 0}
m_ChildStateMachines: [] m_ChildStateMachines: []
m_AnyStateTransitions: [] m_AnyStateTransitions: []
m_EntryTransitions: [] m_EntryTransitions: []

View File

@@ -142,7 +142,9 @@ PlayerSettings:
visionOSBundleVersion: 1.0 visionOSBundleVersion: 1.0
tvOSBundleVersion: 1.0 tvOSBundleVersion: 1.0
bundleVersion: 1.0.0 bundleVersion: 1.0.0
preloadedAssets: [] preloadedAssets:
- {fileID: 1814176829808956018, guid: 58f40b12bbc864f3c96c6505a9a1e1e3, type: 2}
- {fileID: 11400000, guid: d0f8149c48842b4488cf6fb974cff9a2, type: 2}
metroInputSource: 0 metroInputSource: 0
wsaTransparentSwapchain: 0 wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1 m_HolographicPauseOnTrackingLoss: 1