public void Config(int life_count_Max, Action OnLoseLife, Action OnGainLife, Action OnDeath, int initial_life = -1) { life = new LifeBase(life_count_Max, initial_life); life.AddEventListener_Death(OnDeath); life.AddEventListener_GainLife(OnGainLife); life.AddEventListener_LoseLife(OnLoseLife); }
public void Use(LifeBase t) { positionToGo = t.transform.position; target = t; }