WXGame/Blacksmith/Assets/Script/Battle/BattleManager.cs.rej

25 lines
1.3 KiB
Plaintext
Raw Normal View History

2024-12-22 20:56:03 +08:00
diff a/Blacksmith/Assets/Script/Battle/BattleManager.cs b/Blacksmith/Assets/Script/Battle/BattleManager.cs (rejected hunks)
@@ -295,15 +295,15 @@
var index = i;
if (BattleEquipments[i].EquipmentLock)
{
- PrefabPool.ins.LoadObj("Prefab/player/player", (GameObject obj) =>
+ PrefabPool.ins.LoadObj("Prefab/player/player",index, (GameObject obj,int idex) =>
{
- obj.transform.parent = playerParent[index];
+ obj.transform.parent = playerParent[idex];
obj.transform.localPosition=Vector3.zero;
- playerItems[index] = new PlayerRunState();
- playerItems[index].player = obj.GetComponent<PlayerItem>();
- playerItems[index].equipent = BattleEquipments[index];
- playerItems[index].RestState();
-
+ playerItems[idex] = new PlayerRunState();
+ playerItems[idex].player = obj.GetComponent<PlayerItem>();
+ playerItems[idex].equipent = BattleEquipments[idex];
+ playerItems[idex].RestState();
+ playerItems[idex].player.SetModel(idex+1);
});
}
}