public void Update() { Random rdm = new Random(); if (x >= 800) { x = x - rdm.Next(60, 110); } else if (x <= 0) { x = x + rdm.Next(60, 110); } else if (y >= 360) { y = y - rdm.Next(60, 110); } else if (y <= 0) { y = y + rdm.Next(60, 110); } else { x = x + rdm.Next(-15, 15); y = y + rdm.Next(-10, 10); } Position = Position + new Vector2(x, y); GetSprite.Update(); }
public void Update() { Velocity--; GetSprite.Update(); if (Velocity == 0) { exist = false; } }
public void Update() { Position = Position + Direction * Velocity; GetSprite.Update(); if (Position.X > 2000 || Position.X < -300 || Position.Y < -300 || Position.Y > 2000) { exist = false; } }
public void Update() { if (exist) { Position = Position + Direction * MovingSpeed; GetSprite.Update(); if (Position.X > 2000 || Position.X < -300 || Position.Y < -300 || Position.Y > 2000) { exist = false; } } }
public void Update() { GetSprite.Update(); if (!die) { Aquamentus.Position = Aquamentus.Position + new Vector2(-1, 0) * Aquamentus.MovingSpeed; } else { deathtimer--; } if (deathtimer == 0) { Aquamentus.exist = false; } }
public void Update() { GetSprite.Update(); if (!die) { BlueOct.Position = BlueOct.Position - new Vector2(1, 0) * BlueOct.MovingSpeed; } else { deathtimer--; } if (deathtimer == 0) { BlueOct.exist = false; } }
public void Update() { GetSprite.Update(); if (!die) { RedBat.Position = RedBat.Position + new Vector2(0, -1) * RedBat.MovingSpeed; } else { deathtimer--; } if (deathtimer == 0) { RedBat.exist = false; } }
public void Update() { GetSprite.Update(); if (!die) { BlueGoriya.Position = BlueGoriya.Position + new Vector2(0, 1) * BlueGoriya.MovingSpeed; } else { deathtimer--; } if (deathtimer == 0) { BlueGoriya.exist = false; } }
public void Update() { Velocity--; if (Velocity >= 0) { Position = Position + Direction * Velocity; } else { double angle = Math.Atan2(Position.Y - (GlobalDefinitions.Position + new Vector2(30, 30)).Y, (GlobalDefinitions.Position + new Vector2(30, 30)).X - Position.X); Position -= new Vector2((float)(Math.Cos(angle) * Velocity), (float)(Math.Sin(2 * Math.PI - angle) * Velocity)); } GetSprite.Update(); if ((Velocity < 0) && (Position.X > GlobalDefinitions.Position.X) && (Position.Y > GlobalDefinitions.Position.Y) && (Position.Y < GlobalDefinitions.Position.Y + 60) && (Position.X < GlobalDefinitions.Position.X + 60)) { exist = false; } }
public void Update() { GetSprite.Update(); }