Exemple #1
0
 private void SetGravity()
 {
     if (gameObject.CompareTag("Main_Character"))
     {
         MainCharacterStatus status = GetComponent <Main_Character_Status_Manager>().status;
         if ((status == MainCharacterStatus.Normal || status == MainCharacterStatus.KnockBack) && !OnGround)
         {
             Gravity = GetComponent <Gravity_Data>().normal_gravityScale;
         }
         else
         {
             Gravity = 0;
         }
     }
     else if (gameObject.CompareTag("Fairy"))
     {
         FairyStatus status = GetComponent <Fairy_Status_Manager>().status;
         if ((status == FairyStatus.Normal || status == FairyStatus.KnockBack) && !OnGround)
         {
             Gravity = GetComponent <Gravity_Data>().normal_gravityScale;
         }
         else
         {
             Gravity = 0;
         }
     }
 }
Exemple #2
0
 private void OnCharacterHitSpineEdge(CharacterHitSpineEdge C)
 {
     if (C.Character == gameObject)
     {
         status = MainCharacterStatus.KnockBack;
         player.SetVibration(0, KnockBackVibration, KnockBackVibrationTime);
     }
 }
Exemple #3
0
 private void OnLoadLevel(LoadLevel L)
 {
     AimedTimeCount = 0;
     status         = MainCharacterStatus.Normal;
 }