Beispiel #1
0
 private void Awake()
 {
     // @SEE: head is the best place, maybe
     _raycastHit       = new RaycastHit();
     _transform        = GetComponent <Transform>();
     _mUnit            = GetComponent <Unit>();
     _mMaterialApplier = GetComponent <K514MaterialApplier>();
 }
Beispiel #2
0
    /// <summary>
    /// Caching the components.
    /// </summary>
    protected virtual void Awake()
    {
        Controller                = GetComponent <CharacterController>();
        UnitBoneAnimator          = GetComponent <HumanBoneAnimator>();
        UnitSpellTrailEffectGroup = GetComponents <K514TrailGenerator>();
        MaterialApplier           = GetComponent <K514MaterialApplier>();
        CrowdControlGroup         = new List <Buff>();
        _navMeshAgent             = GetComponent <NavMeshAgent>();
        UnitRenderer              = GetComponentInChildren <SkinnedMeshRenderer>();

        ForceVector        = Vector3.zero;
        CurrentHealthPoint = MaximumHealthPoint;
        Mass              = 1f / Mass;
        CastSpeed         = 1.0f;
        hyperParameterSet = new SpellHyperParameter[(int)HyperParameterOfSpell.End];
    }