private void Awake() { Instanse = this; Reset(); EventUtil.AddListener(BallonEventType.AddScore, onAddScore); EventUtil.AddListener(BallonEventType.GameFinish, Reset); EventUtil.AddListener(BallonEventType.StartGame, Reset); }
// Start is called before the first frame update void Start() { EventUtil.AddListener(BallonEventType.EraseSuccess, eraseSuccess); EventUtil.AddListener(BallonEventType.StartGame, startGame); _rectTransform = GetComponent <RectTransform>(); _oriPosition = _rectTransform.position; _AdChoosePannel.SetActive(false); _countText.text = _eraseTime.ToString(); }
// Start is called before the first frame update void Start() { EventUtil.AddListener(BallonEventType.ScoreChange, OnScoreChange); EventUtil.AddListener(BallonEventType.StartGame, StartGame); EventUtil.AddListener(BallonEventType.AdSuccess, adSuccess); EventUtil.AddListener(BallonEventType.EraseSuccess, eraseSuccess); EventUtil.AddListener(BallonEventType.BackToMainMenu, BackToMainMenu); EventUtil.AddListener(BallonEventType.ReadyToFinish, onGameFinish); EventUtil.AddListener(BallonEventType.GameoverWarning, gameoverWarning); EventUtil.AddListener(BallonEventType.CancleGameoverWarning, cancleGameoverWarning); BackToMainMenu(); }
// Start is called before the first frame update void Start() { //EventUtil.AddListener(EventType.FinishLaunch, finishLaunch); EventUtil.AddListener(BallonEventType.StartGame, startGame); EventUtil.AddListener(BallonEventType.Destroy, balloonDestroy); EventUtil.AddListener(BallonEventType.BackToMainMenu, backToMainMenu); EventUtil.AddListener(BallonEventType.BeginUIInteract, beginUIInteract); EventUtil.AddListener(BallonEventType.EndUIInteract, endUIInteract); EventUtil.AddListener(BallonEventType.BalloonInteractBegin, balloonInteractBegin); EventUtil.AddListener(BallonEventType.BalloonInteractDraging, balloonInteractDraging); EventUtil.AddListener(BallonEventType.BalloonInteractEnd, balloonInteractEnd); EventUtil.AddListener(BallonEventType.EraseSuccess, eraseSuccess); EventUtil.AddListener(BallonEventType.AdSuccess, adSuccess); _finishTransform.gameObject.SetActive(false); _gameState = GameState.MainMenu; }