Ejemplo n.º 1
0
	// Use this for initialization
	void Start ()
    {
        stats = GetComponent<LifeStats>();
        stats.OnDeath += OnMyDeath;
        stats.OnDamage += OnMyDamage;

    }
Ejemplo n.º 2
0
	// Use this for initialization
	void Start () {

        lifeStats = GetComponent<LifeStats>();

        OnMyStatsUpdate(); //update current stats
        lifeStats.OnStats += OnMyStatsUpdate; // and subscribe for  health changes
        lifeStats.OnDamage += OnDamageEvent;

    }
Ejemplo n.º 3
0
 public CharacterStats() : base()
 {
     lifeStats  = new LifeStats();
     dmgWeapons = new DmgWeapon[2];
 }