示例#1
0
 private void Awake()
 {
     managerUI        = GameObject.Find("UI").GetComponent <UIManager>();
     lightController  = transform.GetComponent <PlayerLightController>();
     mover            = transform.GetComponent <PlayerMover>();
     animator         = transform.GetComponent <Animator>();
     backWeaponHolder = transform.Find("Root/Hips/Spine_01/Spine_02/Spine_03/WeaponContainer");
 }
示例#2
0
        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;
        }
示例#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;
        }