Exemplo n.º 1
0
 protected void Start()
 {
     status = GameStatus.INITIALIZE;
     hud.StartListeners();
     EventMessenger.StartListener(GameEvents.START_GAME, StartGame);
     EventMessenger.StartListener(GameEvents.DEFEATE, Defeat);
     EventMessenger.StartListener(GameEvents.VICTORY, Victory);
     EventMessenger.StartListener(GameEvents.UPDATE_CRISTAL_COUNT, UpdateCristalCount);
     status = GameStatus.READY;
 }
Exemplo n.º 2
0
 void Start()
 {
     gameCamera        = Camera.main.GetComponent <GameCamera>();
     playerRigidbody   = GetComponent <Rigidbody>();
     animator          = GetComponent <Animator>();
     audioSource       = GetComponent <AudioSource>();
     gameCamera.target = transform;
     gameCamera.Init();
     moveState       = MoveState.STAND;
     playerTransform = transform;
     EventMessenger <int> .StartListener(GameEvents.CHANGE_SPEED, ChangeSpeed);
 }
Exemplo n.º 3
0
        public void StartRules()
        {
            EventMessenger <Enemy, Collider> .StartListener(GameEvents.ENEMY_TAKE_DAMAGE, EnemyTakeDamage);

            EventMessenger <Player, Collider> .StartListener(GameEvents.PLAYER_TAKE_DAMAGE, PlayerTakeDamage);

            EventMessenger <Shell, Collision> .StartListener(GameEvents.DESTROY_SHELL, DestroyShell);

            EventMessenger <Gate, Collision> .StartListener(GameEvents.GATE_TAKE_DAMAGE, DestroyGate);

            EventMessenger <Collector, Collider> .StartListener(GameEvents.COLLECT_CRISTAL, CollectCristal);

            EventMessenger <Collector, Collider> .StartListener(GameEvents.WARP_CRISTAL, WarpCristal);

            EventMessenger <Collector, Collider> .StartListener(GameEvents.STOP_WARP, StopWarp);
        }
Exemplo n.º 4
0
 public void StartListeners()
 {
     EventMessenger.StartListener(GameEvents.CHARGE, Charge);
     EventMessenger.StartListener(GameEvents.DISCHARGE, Discharge);
     EventMessenger.StartListener(GameEvents.UPDATE_HUD, UpdateHUD);
 }