Beispiel #1
0
        public override void Awake()
        {
            base.Awake();

            OnDeathComplete = OnDeathComplete ?? new UnityEvent();
            OnEnemyKilled   = OnEnemyKilled ?? new EnemyEvent();

            Controller      = Controller ?? GetComponentInParent <HedgehogController>();
            HurtReboundMove = HurtReboundMove ?? Controller.GetComponent <MoveManager>().Get <HurtRebound>();
            RingCounter     = RingCounter ?? GetComponentInChildren <RingCounter>();

            HurtInvincibilityTimer = 0.0f;

            HurtInvincibleBoolHash = Animator.StringToHash(HurtInvincibleBool);
        }
Beispiel #2
0
        public override void Reset()
        {
            base.Reset();

            RingLossSound = null;
            ReboundSound  = null;
            DeathSound    = null;
            SpikeTag      = "";
            SpikeSound    = null;

            OnDeathComplete = new UnityEvent();
            OnEnemyKilled   = new EnemyEvent();

            Controller = GetComponentInParent <HedgehogController>();

            HurtReboundMove = Controller.GetMove <HurtRebound>();
            DeathMove       = Controller.GetMove <Death>();

            RingCounter = GetComponentInChildren <RingCounter>();

            RingsLost = 9001;
            HurtInvinciblilityTime = 2.0f;
        }