Ejemplo n.º 1
0
    public override void Use(IFisher fisher)
    {
        PowerBonus powerUp = new PowerBonus ();
        powerUp.Use (fisher, this.sea, null);

        base.Use (fisher);
    }
Ejemplo n.º 2
0
    public void Use(IFisher fisher, ISea sea, IFishing fishing)
    {
        fisher.Power++;
        Debug.Log (fisher.Power);

        if (this.onUsed != null) {
            this.onUsed.Invoke (this);
        }
    }
Ejemplo n.º 3
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;
    }
Ejemplo n.º 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--;
    }
Ejemplo n.º 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;
    }
Ejemplo n.º 6
0
    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;
    }
Ejemplo n.º 7
0
    // 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();
    }
Ejemplo n.º 8
0
 public override void Use(IFisher fisher)
 {
     fisher.Boat.PutStaff (this);
     base.Use (fisher);
 }
Ejemplo n.º 9
0
 public void SetOwner(IFisher fisher)
 {
     this.owner = fisher;
 }
Ejemplo n.º 10
0
 public virtual void Use(IFisher fisher)
 {
     if (this.onUsed != null) {
         this.onUsed.Invoke (this);
     }
 }