/// <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; }
/// <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; } } }
/// <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)); }