protected void Animate(GameTime gTime) { if (gTime.Total.Milliseconds % 1000 < 500) sprite.Texture = textur; else sprite.Texture = textur2; }
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; } }
public override void Update(GameTime gTime) { movementSpeed = baseMovementSpeed * gTime.Ellapsed.Milliseconds; MovingDirection = Game.Player.Position - sprite.Position; Move(); if (isMoving) Animate(gTime); }
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; }
public override void Update(GameTime gTime) { movementSpeed = baseMovementSpeed * gTime.Ellapsed.Milliseconds; KeyboardInput(); Move(); }
public override void Update(GameTime gTime) { throw new NotImplementedException(); }
public abstract void Update(GameTime gTime);