Ejemplo n.º 1
0
        public virtual void HandleEffect(PlayerMover player)
        {
            player.Score += scoreValue;

            //TODO pool
            SpawnerManager.Despawn(this);
            Destroy(gameObject);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
 public void HandleDestroy()
 {
     SpawnerManager.Despawn(this);
     Destroy(gameObject);
 }