public frmMainCombat() { InitializeComponent(); bLog = new BattleLog(); BattleTimer.Start(); bLog.addLog("I live once more..."); }
private void BattleForceButton_Click(object sender, EventArgs e) { timeLeft = 0; timeLabel.Text = timeLeft.ToString(); BattleTimer.Interval = 1000; BattleTimer.Start(); }
void Start() { player = GetComponent <Player>(); playerInput = GetComponent <PlayerInput>(); battleManager = BattleManagerUtils.BattleManager.instance; battleTimer = BattleManagerUtils.BattleManager.BattleTimer; }
public static BattleTimer Instance() { if (mBattleTimer == null) { mBattleTimer = new BattleTimer(); } return mBattleTimer; }
public void Start() { if (!IsReady) { return; } foreach (var session in Session) { Commands.Add(session.EndPoint, new Queue <byte[]>()); } StartTime = DateTime.UtcNow; BattleTimer.Start(); }
private void BattleStartButton_Click(object sender, EventArgs e) { if (timeLabel.Text != "Off") { BattleTimer.Stop(); timeLabel.Text = "Off"; return; } if (timeLeft == 0) { timeLeft = randomizer.Next(min, max); timeLabel.Text = timeLeft.ToString(); } BattleTimer.Interval = 1000; BattleTimer.Start(); }
private async void BattleTimer_Tick(object sender, EventArgs e) { if (timeLeft > 0) { timeLeft = timeLeft - 1; timeLabel.Text = timeLeft.ToString(); return; } BattleTimer.Stop(); int random = randomizer.Next(10); switch (random) { case 0: case 1: case 2: case 3: case 4: case 5: timeLabel.Text = "zombie"; await ZombieRun(); break; case 6: case 7: case 8: timeLabel.Text = "rat"; await RatRun(); break; case 9: default: timeLabel.Text = "skeleton"; await SkeletonRun(); break; } timeLeft = randomizer.Next(min, max); BattleTimer.Start(); }
// Use this for initialization void Start() { battleTimer = transform.root.GetComponent<BattleTimer> (); bar = GetComponent<Image> (); }
public void Stop() { BattleTimer.Stop(); Resources.Sessions.Remove(Session.Id); }
private void Awake() { instance = this; }