Esempio n. 1
0
 private bool IsLinked(AI_Behaviour behaviour, AI_State state)
 {
     if (behaviour.GetType().Name == state.GetType().Name.Substring(3) ||
         behaviour.LinkedStateName == state.GetType().Name)
     {
         return(true);
     }
     return(false);
 }
Esempio n. 2
0
    private void UpdateStats()
    {
        if (_target._animator == null)
        {
            return;
        }

        _runtimeAnimatorController = (_target._animator.runtimeAnimatorController as AnimatorController);
        testFields = _target.GetType()
                     .GetFields(BindingFlags.Instance | BindingFlags.Public)
                     .Where(field => field.GetCustomAttribute <AI_BindParameter>() != null)
                     .ToArray();

        _selected   = new int[testFields.Length];
        _parameters = _runtimeAnimatorController.parameters;

        testFieldNames = new List <string>();
        testFieldNames.Add("None");
        foreach (var f in _parameters)
        {
            testFieldNames.Add(f.name);
        }
        _options = testFieldNames.ToArray();
    }