Exemplo n.º 1
0
        public override void Action(Entity e)
        {
            if (!e.IsGrounded())
            {
                Jumper j = e.GetComponent <Jumper>();

                if (j != null)
                {
                    e.SetIntVelocityX(j.GetTargetAirSpeed());

                    if (!falling && e.FallSpeed() >= j.maxAirSpeed / .75)
                    {
                        falling = true;
                        AddNext(typeof(Jumper.JumpLand), ent => ent.IsGrounded() && ent.FallSpeed() >= 0 && ent.JustLanded());
                    }
                }
            }
        }