#Trap
This commit is contained in:
AliIbnAbiTalib
2023-04-06 22:49:27 +02:00
parent 8c81a72bb8
commit 6954dc5c88
7 changed files with 83 additions and 45 deletions
@@ -363,6 +363,8 @@ public class PlayablePlayer : Player
{
currentField.placedItem = items[index];
GameObject temp = Instantiate(items[index].gameObject);
Trap t = temp.GetComponent<Trap>();
t.target = this;
temp.transform.position = currentField.transform.position + (Vector3.up / 2);
activeItem = Item.Type.None;
}
@@ -110,6 +110,8 @@ public abstract class Player : MonoBehaviour
{
currentField.placedItem = items[index];
GameObject temp = Instantiate(items[index].gameObject);
Trap t = temp.GetComponent<Trap>();
t.target = this;
temp.transform.position = currentField.transform.position + (Vector3.up / 2);
activeItem = Item.Type.None;
}