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;
     }
 }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 6
0
 void OnDestroy()
 {
     instance = null;
 }
Exemplo n.º 7
0
 // Use this for initialization
 void Awake()
 {
     instance         = this;
     transform.parent = null;
     enabled          = false;
 }
Exemplo n.º 8
0
 void Awake()
 {
     isRespawnPoint = true;
     IsRespawnPoint = false;
     rotationAngle  = RotateEverything.ConvertToAngle(transform.rotation);
 }
Exemplo n.º 9
0
 public virtual void Start()
 {
     UpdateSliderActivation();
     RotateEverything.AddPlatform(this);
 }