public OrbitTarget(MainGame parent,int Health, Point orbit, int radius, int speed) : base(parent,Health) { Orbit = orbit; Radius = radius; Speed = speed; }
public Ship(MainGame parent,Rectangle position, Texture2D ship) : base(parent) { this.position = position; def_texture = ship; velocity.X = 0; }
public MovingTarget(MainGame parent,int Health, Point[] path, int startat = 0, int speed = 1,int damage = 0, int worth = 0) : base(parent,Health,0,10) { current_pos = startat; nav = path; move_speed = speed; }
public FriendlyBullet(MainGame parent,Rectangle pos, Color col,Texture2D tex,int damage) : base(parent,1,damage) { def_texture = tex; position = pos; BulletColour = col; }
public Entity(MainGame parent,int hlth = 1, int damage = 0, int score_worth = 0) { game = parent; this.health = health; this.damage = damage; this.score_worth = score_worth; }
static void Main() { game = new MainGame(); //Different from creating the class. This is the part where the class is acutally made so variables are assigned in here. //In this example, the game variable (of the type MainGame) is being assigned to as a new MainGame. game.Run(); //Finally, call the method to run the game. Please now focus your attention to the MainGame class (inside MainGame.cs) }
public Target(MainGame parent,int Health) : base(parent,Health) { }