private bool SpawnEntrance(
            char entryType,
            char playerEntrance,
            bool playerSpawned,
            Vector2 worldPos,
            Vector2 behindPos,
            GridOccupantBehaviour entrance)
        {
            var ret = playerSpawned;

            if (playerEntrance == entryType && !playerSpawned)
            {
                Instantiate(player, worldPos, Quaternion.identity);

                ret = true;
            }
            else
            {
                var entrancePos = worldPos + behindPos;
                var go          = Instantiate(entrance, entrancePos, Quaternion.identity);

                go.transform.parent = terrainParent;
            }

            return(ret);
        }
Esempio n. 2
0
 public void RemoveTileNextFrame(GridOccupantBehaviour occupant)
 {
     StartCoroutine(CoRemoveTile(occupant.CurrentNodeIdx));
 }