public Character(Rectangle hitbox, double speed, int health, float mana) { //sets a couple of timers for polishing the fighting //attackDelay = new System.Timers.Timer(); //attackDelay.Interval = 1000; //attackDelay.Elapsed += AttackDelay; combosReset = new System.Timers.Timer(); combosReset.Interval = 500; combosReset.Elapsed += ComboReset; shotDelay = new System.Timers.Timer(); shotDelay.Interval = 2000; shotDelay.Elapsed += ShotDelay; shotDelay.AutoReset = true; shotDelay.Enabled = true; this.speed = speed; this.health = health; this.mana = mana; this.hitbox = hitbox; Combos = new List <Buttons>(); shootlist = new List <Shot>(); canshoot = true; block = false; canAttack = true; canWalk = true; Jumped = true; gamePadButtons = new Gamepadbuttons(); }
public Game1() { gamePadButtons = new Gamepadbuttons(); Screen = new Screenmanager(); graphics = new GraphicsDeviceManager(this); graphics.PreferredBackBufferHeight = 600; graphics.PreferredBackBufferWidth = 960; graphics.IsFullScreen = false; Content.RootDirectory = "Content"; }
public Screenmanager() { gamePadButtons = new Gamepadbuttons(); titleScreen = new Levels(); FirstLevel = new Levels(); selectScreen = new Levels(); tutorialScreen = new Levels(); settingsScreen = new Levels(); pauseScreen = new Levels(); LinePosition = new Rectangle(x, y, 0, 0); titleScreen.Bool = true; selectScreen.Bool = false; FirstLevel.Bool = false; pauseScreen.Bool = false; Play = true; Tutorial = false; settings = false; Quit = false; tutorialone = true; Combos = new List <Buttons>(); }