void OnCollisionEnter2D(Collision2D other) { if ((other.collider.CompareTag("Player") == true) && (Platformer2DUserControl.CurrentMode == Platformer2DUserControl.Mode.Playing)) { Platformer2DUserControl.StartRespawn(); RotateEverything.RotateTo(Platformer2DUserControl.RespawnCheckPoint); } }
void OnTriggerExit2D(Collider2D other) { if ((Platformer2DUserControl.CurrentMode == Platformer2DUserControl.Mode.Playing) && (isOutOfBounds == false) && (other.CompareTag("Player") == true)) { Platformer2DUserControl.StartRespawn(respawnComplete: Reset); RotateEverything.RotateTo(Platformer2DUserControl.RespawnCheckPoint); isOutOfBounds = true; } }
public void TeleportPlayer(TeleporterPad pad) { if ((lastEnteredPad == null) && ((lastTeleported < 0) || ((Time.time - lastTeleported) > coolDownDuration))) { // FIXME: animated teleportation if (pad1 == pad) { lastEnteredPad = pad1; Platformer2DUserControl.TeleportTo(pad2); RotateEverything.RotateTo(pad2); } else if (pad2 == pad) { lastEnteredPad = pad2; Platformer2DUserControl.TeleportTo(pad1); RotateEverything.RotateTo(pad1); } } }
void Start() { mutator = GetComponent <AudioMutator>(); goalOrientation = RotateEverything.ConvertToAngle(transform.rotation); }
void Awake() { rotationAngle = RotateEverything.ConvertToAngle(transform.rotation); }
void OnDestroy() { instance = null; }
// Use this for initialization void Awake() { instance = this; transform.parent = null; enabled = false; }
void Awake() { isRespawnPoint = true; IsRespawnPoint = false; rotationAngle = RotateEverything.ConvertToAngle(transform.rotation); }
public virtual void Start() { UpdateSliderActivation(); RotateEverything.AddPlatform(this); }