public override void Use(IFisher fisher) { PowerBonus powerUp = new PowerBonus (); powerUp.Use (fisher, this.sea, null); base.Use (fisher); }
public void Use(IFisher fisher, ISea sea, IFishing fishing) { fisher.Power++; Debug.Log (fisher.Power); if (this.onUsed != null) { this.onUsed.Invoke (this); } }
public void Init(IFishing fishing, ISea sea, IFisher fisher, Action method = null) { this.fishing = fishing; this.sea = sea; this.fisher = fisher; this.minimumMoneyBaseCoeff += 50 * (fishing.NumLevel - 1); this.fishing.OnEarnedUpdate += IncomeFunc; }
public void Init(IFishing fishing, ISea sea, IFisher fisher, Action method = null) { this.fishing = fishing; this.sea = sea; this.fisher = fisher; // Пример понижения уровня //this.fishing.NumLevel--; }
public void Init(IFishing fishing, ISea sea, IFisher fisher, Action method = null) { this.fishing = fishing; this.sea = sea; this.fisher = fisher; this.totalObjectForDestroying = this.sea.CountOfCatchableObjects; this.sea.OnDestroyCatchableObject += Foo; }
public void Init(IFishing fishing, ISea sea, IFisher fisher, Action method = null) { this.fishing = fishing; this.sea = sea; this.fisher = fisher; this.fishAmount.Add ("BW Fish", 1); this.fishAmount.Add ("Yellow Fish", 2); this.fishAmount.Add ("Blue Fish", 1); this.sea.OnDestroyCatchableObject += Foo; }
// Use this for initialization void Start() { this.sea = this.seaGameObject.GetComponent<ISea>(); if (this.sea == null) { throw new UnityException("Sea are not initialized"); } this.fisher = this.fisherGameObject.GetComponent<IFisher>(); this.fisher.ClearState(); if (this.fisher == null) { throw new UnityException("Fisher are not initialized"); } this.fisher.Boat.OnPutStaff += (ICatchable obj) => { this.earned += obj.Price; this.earnedInCurrentLevel += obj.Price; if (this.onEarnedUpdate != null) { this.onEarnedUpdate.Invoke(this.earned); } }; this.timer = this.timerGameObject.GetComponent<ITimer>(); if (this.timer == null) { throw new UnityException("Timer are not initialized"); } this.timer.OnTimerStart += (float time) => { this.levelTimeRemainded = time; if (this.onChangeLevelTime != null) { this.onChangeLevelTime.Invoke(time); } }; this.timer.OnTimerEnd += (float time) => { this.levelTimeRemainded = 0; if (this.onChangeLevelTime != null) { this.onChangeLevelTime.Invoke(time); } this.FinishLevel(); }; this.timer.OnTimerBeep += (float time) => { this.levelTimeRemainded = this.levelTimeAmount - time; if (this.onChangeLevelTime != null) { this.onChangeLevelTime.Invoke(this.levelTimeRemainded); } }; this.levelLoader = new SimpleLevelLoader (this.sea); this.IfConditionPassedStartNextLevel(); }
public override void Use(IFisher fisher) { fisher.Boat.PutStaff (this); base.Use (fisher); }
public void SetOwner(IFisher fisher) { this.owner = fisher; }
public virtual void Use(IFisher fisher) { if (this.onUsed != null) { this.onUsed.Invoke (this); } }