Пример #1
0
        protected virtual void Start()
        {
            bossPhysics = transform.parent;

            animator       = GetComponent <Animator>();
            bossStatus     = GetComponent <BossStatus>();
            spriteRenderer = GetComponent <SpriteRenderer>();

            bossMovement = bossPhysics.GetComponent <BossMovement>();
            controller   = bossPhysics.GetComponent <Controller2D>();

            currentState    = State.Idle;
            transitionState = State.Idle;
            //temporaryState = State.None;

            SetAnimTimeDictionary();
            CachingAnimation();
        }
Пример #2
0
        void Start()
        {
            bossPhysics       = transform.parent;
            fsm               = GetComponent <BasicBossFsm>();
            animator          = GetComponent <Animator>();
            spriteRenderer    = GetComponent <SpriteRenderer>();
            bossMovement      = bossPhysics.GetComponent <BossMovement>();
            hitEffectRenderer = hitEffect.GetComponent <ParticleSystemRenderer>();

            blinkWaitTime     = new WaitForSeconds(blinkCycleTime);
            vibrationWaitTime = new WaitForSeconds(vibrationCycleTime);

            maxHp = 100;
            Hp    = maxHp;

            meleeKnockBackTime = new WaitForSeconds(0.3f);
            rangeKnockBackTime = new WaitForSeconds(0.1f);
            stateRecoveryTime  = new WaitForSeconds(0.6f);
        }