Пример #1
0
    public override void OnInit()
    {
        base.OnInit();
        GetComponentInChildren <DamageDealer>().Init(OnGiveDamage);
        DamageTaker damageTaker = GetComponentInChildren <DamageTaker>();

        if (damageTaker)
        {
            damageTaker.Init(OnTakeDamage);
        }
    }