예제 #1
0
    void Lander()
    {
        anm.Land();
        if (updown > 0)
        {
            updown = 0f;
        }
        //transform.position = new Vector2 (transform.position.x, transform.position.y );

        rg.velocity = new Vector2(0, 0);
    }
예제 #2
0
 void Change(bool c)
 {
     if (chase != c)
     {
         if (c == true)
         {
             anm.Jump();
         }
         if (c == false)
         {
             anm.Land();
         }
     }
     chase = c;
 }
예제 #3
0
 // Update is called once per frame
 protected override void OverrideUpdate()
 {
     actTime++;
     if (actTime < 60)
     {
         anm.Land();
         ChangeDirectionToPlayer();
         spd         = maxspd;
         rg.velocity = new Vector2(0, rg.velocity.y);
     }
     if (actTime >= 60)
     {
         if (actTime == 60)
         {
             Jump();
         }
         Move();
     }
     if (actTime >= 120)
     {
         actTime = 0;
     }
     Grav();
 }
예제 #4
0
 void Lander()
 {
     anm.Land();
     rg.velocity = new Vector2(0, 0);
     spd         = 0;
 }
예제 #5
0
 void Lander()
 {
     anm.Land();
     rg.velocity = new Vector2(rg.velocity.x, 0);
 }
예제 #6
0
 void Lander()
 {
     land = true;
     anm.Land();
     rg.velocity = new Vector2(rg.velocity.x, 0);
 }