Beispiel #1
0
        private void Awake()
        {
            player      = GameObject.FindGameObjectWithTag("Player");
            fighter     = player.GetComponent <PlayerFighter>();
            boxCollider = player.transform.Find("MeeleAttackArea").GetComponent <BoxCollider>();

            fighter.OnHit            += ActivateCollider;
            fighter.OnAttackFinished += DeactivateCollider;
            fighter.OnWeaponChange   += ChangeHitStats;
        }
        private void Awake()
        {
            player          = GameObject.FindGameObjectWithTag("Player");
            lightController = player.GetComponent <PlayerLightController>();
            fighter         = player.GetComponent <PlayerFighter>();
            inventory       = player.GetComponent <PlayerInventory>();
            sphereCollider  = player.transform.Find("AOEDamgeArea").GetComponent <SphereCollider>();

            inventory.OnSpellEquip     += ChangeHitStats;
            fighter.OnCauseSpellDamage += ActivateCollider;
            fighter.OnCastFinished     += DeactivateCollider;
        }
Beispiel #3
0
        private void Awake()
        {
            player          = GameObject.FindGameObjectWithTag("Player");
            lightController = player.GetComponent <PlayerLightController>();
            fighter         = player.GetComponent <PlayerFighter>();
            inventory       = player.GetComponent <PlayerInventory>();
            boxCollider     = player.transform
                              .Find("Root/Hips/Spine_01/Spine_02/Spine_03/Clavicle_L/Shoulder_L/Elbow_L/Hand_L/SpellArea")
                              .GetComponent <BoxCollider>();

            inventory.OnSpellEquip += ChangeSpellStats;

            fighter.OnCastStarted  += ActivateCollider;
            fighter.OnCastFinished += DeactivateCollider;
        }
Beispiel #4
0
        void Awake()
        {
            navMeshAgent = GetComponent <NavMeshAgent>();
            animator     = GetComponent <Animator>();
            fighter      = GetComponent <PlayerFighter>();
            managerUI    = GameObject.Find("UI").GetComponent <UIManager>();

            fighter.OnAttackStarted  += StartAttack;
            fighter.OnAttackFinished += StopAttack;

            fighter.OnPowerfullAttackStarted += StartPowerAttack;

            fighter.OnCastStarted  += CastStarted;
            fighter.OnCastFinished += CastFinished;

            fighter.OnBlockStarted  += RestrictMovement;
            fighter.OnBlockFinished += AllowMove;
        }