Exemplo n.º 1
0
 // Use this for initialization
 void Start () {
     playerComboScript = gameObject.GetComponent<PlayerComboManager>();
     playerStamina = gameObject.GetComponent<PlayerStamina>();
     /**Initialise les sorts actif **/
     if (SaveManager.instance.getValue<string>("Spell1") != default(string))
         m_Spells[0] = (Spell)Activator.CreateInstance(Type.GetType(SaveManager.instance.getValue<string>("Spell1")), new object[] { gameObject });
     if (SaveManager.instance.getValue<string>("Spell2") != default(string))
         m_Spells[1] = (Spell)Activator.CreateInstance(Type.GetType(SaveManager.instance.getValue<string>("Spell2")), new object[] { gameObject });
     if (SaveManager.instance.getValue<string>("Spell3") != default(string))
         m_Spells[2] = (Spell)Activator.CreateInstance(Type.GetType(SaveManager.instance.getValue<string>("Spell3")), new object[] { gameObject });
 }
Exemplo n.º 2
0
	// Use this for initialization
	void Awake () {
        playerComboScript = GetComponentInParent<PlayerComboManager>();
        m_PlayerStamina = GetComponentInParent<PlayerStamina>();
        m_Combo = new Combos(this, m_damageMultiplier, m_staminaCost);
        anim = GetComponent<Animator>();
	}