void split() { Destroy(this.otherInput); this.otherPlayer.gameObject.SetActive(true); this.otherPlayer.transform.position = this.transform.position; EntityMovement otherEntitiyMovement = this.otherPlayer.GetComponent <EntityMovement>(); switch (this.GetComponent <EntityMovement>().direction) { case EntityMovement.Direction.Up: otherEntitiyMovement.changeDirection(EntityMovement.Direction.Down, true); break; case EntityMovement.Direction.Down: otherEntitiyMovement.changeDirection(EntityMovement.Direction.Up, true); break; case EntityMovement.Direction.Left: otherEntitiyMovement.changeDirection(EntityMovement.Direction.Right, true); break; case EntityMovement.Direction.Right: otherEntitiyMovement.changeDirection(EntityMovement.Direction.Left, true); break; } this.otherPlayer.startCooldown(); this.otherPlayer = null; this.isMega = false; this.startCooldown(); }