// Use this for initialization
    void Start()
    {
        this.fishing = this.fishingGameObject.GetComponent<IFishing> ();

        if (this.fishing == null) {
            throw new UnityException ("Fishing have not initialized");
        }

        this.fishing.OnEarnedUpdate += (float money) => {
            this.textForEarnedMoney.text = money.ToString();
        };

        this.fishing.OnRequiredUpdate += (float money) =>
        {
            this.textForRequiredMoney.text = money.ToString();
        };

        this.fishing.OnLevelUpdate += (ushort levelNum) => {
            this.textForLevelNumber.text = levelNum.ToString();
        };

        this.fishing.OnChangeLevelTime += (float time) => {
            this.textForTimeRemainded.text = time.ToString();
        };
    }
Example #2
0
    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;
    }
Example #3
0
    public void Use(IFisher fisher, ISea sea, IFishing fishing)
    {
        fisher.Power++;
        Debug.Log (fisher.Power);

        if (this.onUsed != null) {
            this.onUsed.Invoke (this);
        }
    }
Example #4
0
    public void Init(IFishing fishing, ISea sea, IFisher fisher, Action method = null)
    {
        this.fishing = fishing;
        this.sea = sea;
        this.fisher = fisher;

        // Пример понижения уровня
        //this.fishing.NumLevel--;
    }
Example #5
0
    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;
    }