private void OnGoalEvent(bool isGoal, Area area) { StartCoroutine( FootballMain.LateExecution(1, Reset) ); bool isMaxRound = this.footballMain.footballViewCtrl.UpdateScore((isGoal) ? 1 : 0, 1); if (isGoal && !isMaxRound) { AudioManager.instance.PlayAudio(this.gameObject, EventFlag.Audio.Hurrah, 1); } }
public void SetUp(FootballMain footballMain) { if (FootballCore == null) { return; } this.footballMain = footballMain; recordBallFlightTime = 0; goalKeeperLevel = FootballCore.GetComponentInChildren <GoalKeeperLevel>(); GoalDetermine.EventFinishShoot += OnGoalEvent; Reset(); }
public void SetUp(FootballMain footballMain) { this.footballMain = footballMain; }