private void StartApproach() { // print("Showing text"); PopupText.ShowText("Get close!"); state = Mission1State.Approach; UI.UpdateQuest(1, MaxQuest); UI.SetGoalText("Approach the target", string.Format("Distance remaining: {0:0.00}", GetDistance() - 2.5f)); }
private void StartHit3() { Opponent.SwitchMovement(OpponentState.CircleMovement); PopupText.ShowText("3x hits!", 1); state = Mission2State.Hit5; UI.UpdateQuest(1, MaxQuest); Controller.DummyAttack = true; UI.SetGoalText("Hit target with melee weapon", string.Format("{0} / {1}", meleeHits, 3)); }
private void StartShoot5() { rangedHits = 0; Opponent.SwitchMovement(OpponentState.Stationary); PopupText.ShowText("5x hits!", 1); state = Mission3State.Shoot5; UI.UpdateQuest(1, MaxQuest); Controller.DummyAttack = true; UI.SetGoalText("Hit target with ranged weapon", string.Format("{0} / {1}", rangedHits, 5)); }
private void StartBeatIt() { Opponent.SwitchMovement(OpponentState.MortarFiring); PopupText.ShowText("Beat it!", 1); state = Mission5State.BeatIt; UI.UpdateQuest(2, MaxQuest); Controller.DummyAttack = false; UI.SetGoalText("Beat opponent", string.Format("Health remaining: {0:0.00}", Controller.OpponentHealth.Health > 0 ? Controller.OpponentHealth.Health : 0)); }
public void GotHit() { GameManager.instance.PlayClip(sound); hitPointes--; if (hitPointes > 0) { col.enabled = true; } else { ScoreManager.AddScore(score); GameObject pop = Instantiate(popupText) as GameObject; pop.transform.SetParent(UIManager.instance.transform, false); pop.transform.position = Camera.main.WorldToScreenPoint(transform.position); PopupText popText = pop.GetComponent <PopupText>(); popText.ShowText(score); DestroyObj(); } }