public void T02_Throwing8ReturnsTidy() { throws.Add(8); ActionManager.Action nextAction = ActionManager.GetNextAction(throws); Assert.AreEqual(tidy, nextAction); }
public void Setup() { throws = new List <int>(); endTurn = ActionManager.Action.EndTurn; tidy = ActionManager.Action.Tidy; reset = ActionManager.Action.Reset; endGame = ActionManager.Action.EndGame; }
public void T01_OneStrikeRetursnEndTurn() { throws.Add(10); ActionManager.Action nextAction = ActionManager.GetNextAction(throws); Assert.AreEqual(endTurn, nextAction); }
public void T05_ThrowingStrikeOnLastFrameReturnsReset() { AddNineFrames(throws); throws.Add(10); ActionManager.Action nextAction = ActionManager.GetNextAction(throws); Assert.AreEqual(reset, nextAction); }
private void OnActionSelected(ActionManager.Action action, Vector2 position) { endPos = position; if (lineCount > 0) { startPos = position; } DrawPath(); }
public void T03_ThrowingSpareReturnsEndTurn() { throws.AddRange(new List <int>() { 2, 8 }); ActionManager.Action nextAction = ActionManager.GetNextAction(throws); Assert.AreEqual(endTurn, nextAction); }
public void Perform(ActionManager.Action action) { if (action == ActionManager.Action.Tidy) { animator.SetTrigger("tidyTrigger"); } else { animator.SetTrigger("resetTrigger"); } }
public void T12_GutterBallAfterLastFrameStrikeShouldReturnTidy() { AddNineFrames(throws); throws.AddRange(new List <int>() { 10, 0 }); ActionManager.Action nextAction = ActionManager.GetNextAction(throws); Assert.AreEqual(tidy, nextAction); }
public void T09_ThrowingTwoBallsAfterLastFrameStrikeEndsGame() { AddNineFrames(throws); throws.AddRange(new List <int>() { 10, 6, 2 }); ActionManager.Action nextAction = ActionManager.GetNextAction(throws); Assert.AreEqual(endGame, nextAction); }
public void T08_ThrowingStrikeBallAfterLastFrameSpareEndsGame() { AddNineFrames(throws); throws.AddRange(new List <int>() { 3, 7, 10 }); ActionManager.Action nextAction = ActionManager.GetNextAction(throws); Assert.AreEqual(endGame, nextAction); }
public void T13_ThrowingGutterBallThenSpareReturnsEndTurnAndIncrementsThrowOnce() { throws.AddRange(new List <int>() { 0, 10 }); ActionManager.Action nextAction = ActionManager.GetNextAction(throws); Assert.AreEqual(endTurn, nextAction); //Assert.AreEqual(3, scoreManager.GetCurrentThrowNumber()); }
public void T06_ThrowingSpareOnLastFrameReturnsReset() { AddNineFrames(throws); throws.AddRange(new List <int>() { 3, 7 }); ActionManager.Action nextAction = ActionManager.GetNextAction(throws); Assert.AreEqual(reset, nextAction); }
public void T04_ThrowingNoSpareOrStrikeOnLastFrameReturnsEndGame() { AddNineFrames(throws); throws.AddRange(new List <int>() { 5, 1 }); ActionManager.Action nextAction = ActionManager.GetNextAction(throws); Assert.AreEqual(endGame, nextAction); }
public void T10_ThrowingTwoStrikesAfterLastFrameStrikeEndsGame() { AddNineFrames(throws); throws.Add(10); ActionManager.Action nextAction = ActionManager.GetNextAction(throws); Assert.AreEqual(reset, nextAction); throws.Add(10); Assert.AreEqual(reset, ActionManager.GetNextAction(throws)); throws.Add(10); Assert.AreEqual(endGame, ActionManager.GetNextAction(throws)); }
private Color GetColorBasedOnAction() { ActionManager.Action action = tileMode.CurrentAction; if (action == ActionManager.Action.Copy) { return(new Color(255, 209, 56)); } else if (action == ActionManager.Action.Paste) { return(new Color(56, 255, 86)); } else if (action == ActionManager.Action.Delete) { return(new Color(255, 94, 94)); } return(Color.White); }
public void OnTileModeActionControl(ControlPanel cp) { if (CurrentAction == ActionManager.Action.Copy) { CurrentAction = ActionManager.Action.Paste; cp.actionBtnIcon.texture = cp.pasteAction; } else if (CurrentAction == ActionManager.Action.Paste) { CurrentAction = ActionManager.Action.Delete; cp.actionBtnIcon.texture = cp.deleteAction; } else if (CurrentAction == ActionManager.Action.Delete) { CurrentAction = ActionManager.Action.Restore; cp.actionBtnIcon.texture = cp.restoreAction; } else if (CurrentAction == ActionManager.Action.Restore) { CurrentAction = ActionManager.Action.Copy; cp.actionBtnIcon.texture = cp.copyAction; } CoreManager.ShowNotification(CoreManager.defaultNotificationTime, GetOnActionControlMsg()); }
private void OnActionSelected(ActionManager.Action action, Vector2 position) { actions.Enqueue(Walk(position)); actions.Enqueue(Wait(timeBetweenActions)); }
public ActionAttr(ActionManager.Action action) { Action = action; }