Exemple #1
0
 void Start()
 {
     if (system == null)
     {
         system = GetComponentInParent <SkillSystem> ();
     }
     weights = new float[system.numberOfTraits];
     for (int i = 0; i < weights.Length; i++)
     {
         weights [i] = system.randomValue;
     }
 }
Exemple #2
0
        void Reset()
        {
            system = GetComponentInParent <SkillSystem> ();

            var added = GetComponentsInChildren <Node> ();

            for (int i = 0; i < added.Length; i++)
            {
                if (added[i] != null && added[i] != this)
                {
                    Destroy(this);
                    return;
                }
            }
        }
Exemple #3
0
 void Reset()
 {
     system = GetComponentInParent <SkillSystem> ();
 }