Added interaction for trees and stones, added items wood, stone, book and slimeball, v1.4.0

This commit is contained in:
Nicola Sovic
2022-07-12 12:11:32 +02:00
parent 8dbc177dcb
commit d898a1c5fd
23 changed files with 643 additions and 17 deletions

View File

@@ -53,6 +53,18 @@ public class Controls : MonoBehaviour
case "Enemy":
fight.GetComponent<Fight>().startFight(worldGen.GetComponent<WorldGenerator>().getCurrentTile(), target, player);
break;
case "Tree":
GameObject.Find("Inventory").GetComponent<Inventory>().addItem(new Item("Wood"));
Destroy(target);
break;
case "Stone":
GameObject.Find("Inventory").GetComponent<Inventory>().addItem(new Item("Stone"));
Destroy(target);
break;
case "NPC":
break;
case "House":
break;
}
}
}