private void SpawnItem(GameObject chestPrefab, Cell cell, ItemController itemController) { CellEntity chestEntity = Instantiate(chestPrefab, cell.Transform).GetComponent <CellEntity>(); chestEntity.Attach(cell); chestEntity.GetComponent <ChestInteractable>()?.Initialize(itemController); }
public CellEntity GeneratePlayer(Cell cell) { CellEntity player = Instantiate(playerPrefab).GetComponent <CellEntity>(); player.Attach(cell); player.transform.position = cell.Transform.position; return(player); }
public CellEntity GenerateEnemy(GameObject prefab, Cell cell) { CellEntity enemy = Instantiate(prefab).GetComponent <CellEntity>(); enemy.Attach(cell); enemy.transform.position = cell.Transform.position; return(enemy); }
public void Drop(Cell cell) { CellEntity.Attach(cell); ParentEntity = null; }