Пример #1
0
	private void Teleport(Creature creature)
	{
		if (!creature.teleported && teleportDestination) {
			creature.ResetVelocities();
			creature.teleported = true;
			Node newTarget = teleportDestination.nextNode;
			creature.ChangeTarget(newTarget);
			creature.transform.LookAt(newTarget.transform.position);
			creature.transform.position = teleportDestination.transform.position;
            foreach (Button button in buttonsToTeleport)
            {
                button.Pressed(false);
            }
		}
		else{
			creature.teleported = false;
		}
		isInTeleporter = false;
	}