示例#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);
 }