예제 #1
0
        public void Move(int _deltaTime)
        {
            int motionDeltaDistance = 0;

            if (this.Movement.isFlying)
            {
                VInt3 location;
                if (this.motionControlers.Count != 0)
                {
                    for (int i = 0; i < this.motionControlers.Count; i++)
                    {
                        SpecialMotionControler controler = this.motionControlers[i];
                        motionDeltaDistance += controler.GetMotionDeltaDistance(_deltaTime);
                    }
                    location    = this.Movement.actor.location;
                    location.y += motionDeltaDistance;
                    if (this.Movement.actor.groundY.i > location.y)
                    {
                        location.y = this.Movement.actor.groundY.i;
                        this.Movement.actor.location = location;
                    }
                    else
                    {
                        this.Movement.actor.location = location;
                    }
                }
                else
                {
                    location = this.Movement.actor.location;
                    if (this.Movement.actor.groundY.i == this.Movement.actor.location.y)
                    {
                        this.Movement.isFlying = false;
                        this.gravityControler.ResetTime();
                    }
                    else if (this.Movement.actor.groundY.i > this.Movement.actor.location.y)
                    {
                        location.y = this.Movement.actor.groundY.i;
                        this.Movement.actor.location = location;
                        this.Movement.isFlying       = false;
                        this.gravityControler.ResetTime();
                    }
                    else
                    {
                        motionDeltaDistance = this.gravityControler.GetMotionDeltaDistance(_deltaTime);
                        location.y         += motionDeltaDistance;
                        if (this.Movement.actor.groundY.i > location.y)
                        {
                            location.y = this.Movement.actor.groundY.i;
                            this.Movement.actor.location = location;
                            this.Movement.isFlying       = false;
                            this.gravityControler.ResetTime();
                        }
                        else
                        {
                            this.Movement.actor.location = location;
                        }
                    }
                }
            }
        }
예제 #2
0
        public void Move(int _deltaTime)
        {
            int num = 0;

            if (!this.Movement.isFlying || this.Movement.actor.ActorControl.GetNoAbilityFlag(ObjAbilityType.ObjAbility_Freeze))
            {
                return;
            }
            if (this.motionControlers.get_Count() != 0)
            {
                for (int i = 0; i < this.motionControlers.get_Count(); i++)
                {
                    SpecialMotionControler specialMotionControler = this.motionControlers.get_Item(i);
                    num += specialMotionControler.GetMotionDeltaDistance(_deltaTime);
                }
                VInt3 location = this.Movement.actor.location;
                location.y += num;
                if (this.Movement.actor.groundY.i > location.y)
                {
                    location.y = this.Movement.actor.groundY.i;
                    this.Movement.actor.location = location;
                }
                else
                {
                    this.Movement.actor.location = location;
                }
            }
            else
            {
                VInt3 location = this.Movement.actor.location;
                if (this.Movement.actor.groundY.i == this.Movement.actor.location.y)
                {
                    this.Movement.isFlying = false;
                    this.gravityControler.ResetTime();
                    return;
                }
                if (this.Movement.actor.groundY.i > this.Movement.actor.location.y)
                {
                    location.y = this.Movement.actor.groundY.i;
                    this.Movement.actor.location = location;
                    this.Movement.isFlying       = false;
                    this.gravityControler.ResetTime();
                }
                else
                {
                    num         = this.gravityControler.GetMotionDeltaDistance(_deltaTime);
                    location.y += num;
                    if (this.Movement.actor.groundY.i > location.y)
                    {
                        location.y = this.Movement.actor.groundY.i;
                        this.Movement.actor.location = location;
                        this.Movement.isFlying       = false;
                        this.gravityControler.ResetTime();
                    }
                    else
                    {
                        this.Movement.actor.location = location;
                    }
                }
            }
        }