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