예제 #1
0
 void WinCondition()
 {
     if (plyerttu.GetAlive() && plyerttu.GetSafeLanding())
     {
         plyerMove.SetInAnimation(true);
         if (wPlyerMove.Animation())
         {
             requestHudToNext = true;
         }
         if (next)
         {
             plyerMove.RestartPosition();
             plyerttu.SetAlive(true);
             plyerttu.SetSafeLanding(false);
             mp.RestartMap();
             plyerMove.SetInAnimation(false);
             requestHudToNext = false;
             next             = false;
         }
     }
 }
예제 #2
0
 private void OnCollisionEnter2D(Collision2D col)
 {
     if (col.gameObject.tag == "Player")
     {
         playerStatus w    = col.gameObject.GetComponent <playerStatus>();
         Vector2      velP = col.gameObject.GetComponent <move>().GetVelocity();
         if (imVictoryCollision && Mathf.Abs(velP.x) < minVel && Mathf.Abs(velP.y) < minVel && Mathf.Abs(col.transform.rotation.eulerAngles.z) < minRotate)
         {
             w.SetSafeLanding(true);
             w.SumPoints(myValue * pointsInSafe);
         }
         else
         {
             w.SetAlive(false);
             w.SetSafeLanding(false);
         }
     }
 }