void Start() { bool Emitting = false; Data = gameObject.GetComponentInParent <demon>().Data; // Get data que le component Démon à loadé. AddSphere(); }
void Awake() { print("DEMON AWAKE"); // parsing de la table des démons / trouver l'item = name prefab > accès aux data de la librairie for (int f = 0; f < myDemons.itemList.Count; f++) { //Debug.Log (myDemons.itemList[f].DemonName); if (myDemons.itemList[f].DemonName == myName) { Data = myDemons.itemList[f]; // Debug.Log("FOUNDED" + f + " name "+Data.TargetList[0].TagName ); break; } } // création des components de liste Ability for (int f = 0; f < Data.ability.Count; f++) { if (Data.ability[f] != null) { string myAbility = Data.ability[f]; //Debug.Log("FOUNDED" + compoName ); gameObject.AddComponent(System.Type.GetType(myAbility)); } } }