Esempio n. 1
0
        public Collectable Spawn(BoardNode n)
        {
            PlatformNode pn;

            if (n.TryGetComponent(out pn))
            {
                transform.position = n.landingPosition.position;
                currentNode        = pn;
                return(this);
            }

            SpawnerManager.Despawn(this);
            return(null);
        }
Esempio n. 2
0
        public Enemy Spawn(BoardNode spawnerNode)
        {
            SpawnerNode sp;

            if (spawnerNode.TryGetComponent(out sp))
            {
                facing             = sp.forwardDirection;
                currentNode        = spawnerNode;
                transform.position = spawnerNode.landingPosition.position;
                transform.Rotate(new Vector3(0, (int)facing * 90, 0));
                PrepareTurn();
                return(this);
            }

            SpawnerManager.Despawn(this);

            return(null);
        }