Esempio n. 1
0
 void Awake()
 {
     ReadOnly_DaddysLove = -1;        //just in case
     self = this;
 }
Esempio n. 2
0
 public static void GetSavedAbilities()
 {
     //Debug.Log("GOT SAVED ABILITIES, OPENED DOORS. Red door: " + redDoorOpened + ", red door potential: " + potential_redDoorOpened + ", " + Time.time);
     if (levelName != SceneManager.GetActiveScene().name)
     {
         //new level
         levelName       = SceneManager.GetActiveScene().name;
         SavedDaddysLove = 5;
         ThrowingBallScript.External_SetToXDaddysLove(5, "Reset because new level");
         WipeSavedAbilities();
     }
     else
     {
         ThrowingBallScript.External_SetToXDaddysLove(SavedDaddysLove, "Set To Saved");
     }
     if (xa.playerScript != null)
     {
         if (!xa.playerHasDoubleJump && doubleJump)
         {
             xa.playerHasDoubleJump = true;
         }
         if (!xa.playerScript.hasTripleJump && tripleJump)
         {
             xa.playerScript.hasTripleJump = true;
         }
         if (!xa.playerScript.hasQuintupleJump && quintupleJump)
         {
             xa.playerScript.hasQuintupleJump = true;
         }
         if (!xa.playerScript.hasExplosiveJump && explosiveJump)
         {
             xa.playerScript.hasExplosiveJump = true;
         }
         if (!xa.playerScript.hasSword && airsword)
         {
             xa.playerScript.hasSword = true;
         }
         if (!xa.playerScript.hasPunch && punch)
         {
             xa.playerScript.hasPunch = true;
         }
         if (!xa.playerHasGroundPound && stomp)
         {
             xa.playerHasGroundPound = true;
         }
     }
     if (self != null)
     {
         if (redDoorOpened)
         {
             iTweenEvent.GetEvent(self.redDoorGO, "remoteTween1").Play();
         }
         if (pinkDoorOpened)
         {
             iTweenEvent.GetEvent(self.pinkDoorGO, "remoteTween1").Play();
         }
         if (orangeDoorOpened)
         {
             iTweenEvent.GetEvent(self.orangeDoorGO, "remoteTween1").Play();
         }
         if (purpleDoorOpened)
         {
             iTweenEvent.GetEvent(self.purpleDoorGO, "remoteTween1").Play();
         }
     }
 }