Example #1
0
        private void AddCustomComponents()
        {
            _anim      = gameObject.AddComponent <TisoAnimator>();
            _audio     = gameObject.AddComponent <TisoAudio>();
            _phaseCtrl = gameObject.AddComponent <PhaseControl>();
            _attacks   = gameObject.AddComponent <TisoMoves>();

            _sr = GetComponent <SpriteRenderer>();
        }
Example #2
0
        private void Awake()
        {
            _instance = this;

            _anim      = GetComponent <TisoAnimator>();
            _audio     = GetComponent <TisoAudio>();
            _rand      = new Random();
            _rb        = GetComponent <Rigidbody2D>();
            _recoil    = GetComponent <Recoil>();
            _sr        = GetComponent <SpriteRenderer>();
            _phaseCtrl = GetComponent <PhaseControl>();

            _phaseCtrl.TriggeredPhase2 += OnTriggeredPhase2;
            _phaseCtrl.TriggeredPhase3 += OnTriggeredPhase3;

            HeroController.instance.OnDeath += OnHeroDeath;

            _bee      = TisoSpencer.PreloadedGameObjects["Bee"];
            _hornet   = TisoSpencer.PreloadedGameObjects["Hornet"];
            _kin      = TisoSpencer.PreloadedGameObjects["Kin"];
            _mageLord = TisoSpencer.PreloadedGameObjects["Mage"].LocateMyFSM("Mage Lord");
        }