public Target(ref TargetAttack ta, ref global_vars vars, ref Game1 game) : base(game) { this.game = game; this.variables = vars; thisTarget = this; position = new Rectangle(vars.screen_width/2, vars.screen_height/2, 100, 100); attack = ta; }
protected void getTarget() { Target t = new Target(ref thisTA, ref variables, ref game); game.Components.Add(t); }
public static void handleTargetCommands(ref Target target, ref global_vars vars) { keypressed = Keyboard.GetState(); if (keypressed.IsKeyDown(Keys.Up)) target.move('u'); else if (keypressed.IsKeyDown(Keys.Down)) target.move('d'); else if (keypressed.IsKeyDown(Keys.Right)) target.move('r'); else if (keypressed.IsKeyDown(Keys.Left)) target.move('l'); else if (keypressed.IsKeyDown(Keys.Enter)) target.select(); }