Пример #1
0
 protected void Animate(GameTime gTime)
 {
     if (gTime.Total.Milliseconds % 1000 < 500)
         sprite.Texture = textur;
     else
         sprite.Texture = textur2;
 }
Пример #2
0
 public void Update(GameTime gTime, Vector2f positionPlayer)
 {
     if (positionPlayer.X>this.Position.X&&positionPlayer.Y>this.Position.Y&& positionPlayer.X<this.Position.X+this.Size.X&& positionPlayer.Y < this.Position.Y + this.Size.Y)
     {
         isOnMap = false;
     }
 }
Пример #3
0
 public override void Update(GameTime gTime)
 {
     movementSpeed = baseMovementSpeed * gTime.Ellapsed.Milliseconds;
     MovingDirection = Game.Player.Position - sprite.Position;
     Move();
     if (isMoving)
         Animate(gTime);
 }
Пример #4
0
 public static void Initialize()
 {
     gTime = new GameTime();
     map = new Map(new System.Drawing.Bitmap("Bilder/Map.bmp"));
     Player = new Player(new Vector2f(map.TileSize + 30, map.TileSize + 30));
     mons01 = new Monster01("Bilder/Monster.png", new Vector2f(800, 100));
     mons02 = new Monster01("Bilder/Monster.png", new Vector2f(100, 600));
     tool = new Tools("Bilder/Tool1.png", new Vector2f (800, 800));
        // vulkan = new Vulkan("Bilder/Vulkan.png", new Vector2f(500, 500);
     view = new View();
     view.Center = Player.Position;
 }
Пример #5
0
 public override void Update(GameTime gTime)
 {
     movementSpeed = baseMovementSpeed * gTime.Ellapsed.Milliseconds;
     KeyboardInput();
     Move();
 }
Пример #6
0
 public override void Update(GameTime gTime)
 {
     throw new NotImplementedException();
 }
Пример #7
0
 public abstract void Update(GameTime gTime);