public object Clone() { IFAK ifak = new IFAK(new Point(Pos.X, Pos.Y), new Point(Dir.X, Dir.Y), new Size(Size.Width, Size.Height)); ifak.Power = Power; return(ifak); }
public static void Load() { _obj = new Star[30]; _ifak = new IFAK[4]; var rnd = new Random(); for (int i = 0; i < _obj.Length; i++) { int r = rnd.Next(5, 25); _obj[i] = new Star(new Point(150, rnd.Next(r, r)), new Point(-r, r), new Size(2, 2)); } CreateAsteroids(Asteroidscount); for (int i = 0; i < _ifak.Length; i++) { int r = rnd.Next(5, 30); _ifak[i] = new IFAK(new Point(1000, rnd.Next(0, Game.Height)), new Point(-r / 5, r), new Size(r, r)); } }