public BattleGameLoop(BattleNetworkHandler handler, int max) { this.handler = handler; timer = new Timer(BattleApplicationBooter.deltaTime.ToFloat() * 1000); timer.Elapsed += SendFrame; timer.Enabled = true; movement = new NetJoystick(); inputUnit = new NetInputUnit[max + 1]; for (int i = 0; i < max + 1; i++) { inputUnit[i] = new NetInputUnit(); } }
public override void Init(BattleNetworkHandler handler, int clientId = -1) { base.Init(handler, clientId); input = handler.gameLoop[clientId]; }