Esempio n. 1
0
 public static void InGameUpdate()
 {
     Game1.mapLive.Update();
     Game1.PlayerInstance.Update(MouseInput.MouseRealPosGame());
     Camera2DGame.Update();
     UIPlayer.Update();
     Game1.PlayerInstance.UpdateWeapons(MouseInput.MouseRealPosGame());
 }
Esempio n. 2
0
        public void HowILookCalc(Player player)
        {
            if (MouseInput.MouseRealPosGame().X > player.Boundary.Origin.X)
            {
                FacingCab = mechFacingCabin.right;
            }
            if (MouseInput.MouseRealPosGame().X < player.Boundary.Origin.X)
            {
                FacingCab = mechFacingCabin.left;
            }

            if (player.Resolver.TouchBottom || player.Resolver.InWater || player.Resolver.TouchTopMovable)
            {
                WalkingVisible = true;

                RotLeg  += Game1.Delta / 25 * player.Velocity.X;
                WalkSin += Game1.Delta / 25 * player.Velocity.X;

                if (Math.Abs(player.Velocity.X - player.Resolver.VelocityReceived.X) < 0.05f)
                {
                    WalkingVisible = false;
                }
            }
            else
            {
                WalkingVisible = false;
            }

            if (player.Velocity.X > 0)
            {
                FacingLegs = mechFacingLegs.right;
            }
            if (player.Velocity.X < 0)
            {
                FacingLegs = mechFacingLegs.left;
            }
        }
Esempio n. 3
0
 public static void InWorldUpdate()
 {
     Game1.PlayerWorldInstance.Update(MouseInput.MouseRealPosGame());
     Camera2DWorld.Update();
     Game1.mapLiveWorld.Update();
 }