Beispiel #1
0
 public void EquipedItems()
 {
     foreach (GameObject item in listGameObjectsEquiped)
     {
         if (player.GetSide().Equals("right"))
         {
             item.transform.position = new Vector3(player.transform.position.x + 1, player.transform.position.y, -2);
             item.GetComponent <SpriteRenderer>().flipX = false;
         }
         else
         {
             item.transform.position = new Vector3(player.transform.position.x - 1, player.transform.position.y, -2);
             item.GetComponent <SpriteRenderer>().flipX = true;
         }
     }
 }