Esempio n. 1
0
 /// <summary>
 /// Disable player.
 /// </summary>
 /// <param name="recursive">Disable recursively. Not relevant here.</param>
 public override void Disable(bool recursive = true)
 {
     SetPosition(spawnPosition);
     Visible = false;
     if (worm != null)
     {
         worm.Player = null;
     }
     worm = null;
 }
Esempio n. 2
0
 /// <summary>
 /// Posess or unposess worm.
 /// </summary>
 private void Posess()
 {
     if (worm != null)
     {
         worm.Player = null;
         worm        = null;
     }
     else
     {
         worm = scene.NearestWorm(Position, 250);
         if (worm != null)
         {
             worm.Player = this;
         }
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Turn a worm into a block.
 /// </summary>
 /// <param name="worm">Worm to transform</param>
 /// <returns>Block</returns>
 public BlockModule SpawnBLock(Worm worm)
 {
     return(blockSpawner.Spawn(worm, this));
 }