Пример #1
0
 public Attacker(IAttackable attackable, IAttackInput attackInput)
 {
     this.attackable  = attackable;
     this.attackInput = attackInput;
     disposable       = attackInput.OnInputAttackObservable.Subscribe(_ => attackable.Attack());
 }
 private void Awake()
 {
     attackInput = GetComponent <IAttackInput>();
 }