Exemple #1
0
        public virtual void HandleEffect(PlayerMover player)
        {
            player.Score += scoreValue;

            //TODO pool
            SpawnerManager.Despawn(this);
            Destroy(gameObject);
        }
Exemple #2
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);
        }
Exemple #3
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);
        }
Exemple #4
0
 public void HandleDestroy()
 {
     SpawnerManager.Despawn(this);
     Destroy(gameObject);
 }