public Shot(int entityID, string shotType, ShotDirections direction) { this.firstMove = true; this.delete = false; this.direction = direction; this.shotLifeSpan = EntityManager.getInstance.getEntity(entityID).stats.shotLifeSpan; this.lifeTicks = 0; this.shot = new Utilities.Pair<int, int>(EntityManager.getInstance.createEntity(shotType), EntityManager.getInstance.createEntity(shotType + shotBack)); this.inputTimer = new Timer(); this.inputTimer.Interval = Configurations.getInstance.MOVEMENT_INTERVAL_MIN - EntityManager.getInstance.getEntity(entityID).stats.shotSpeed; this.inputTimer.Enabled = true; this.inputTimer.AutoReset = true; this.inputTimer.Elapsed += new ElapsedEventHandler(updateMoveToggle); this.inputTimer.Start(); initializeShot(); }
public void createShot(int entityID, string shotType, ShotDirections direction) { Shot newShot = new Shot(entityID, shotType, direction); shotIDs.Add(newShot.shot.First); shotIDs.Add(newShot.shot.Second); }