Esempio n. 1
0
 /// <summary>
 /// セットアップ
 /// </summary>
 public void Setup(FishWaveData data)
 {
     this.max = (int)data.formationDatas
                .Select(x => x.data)
                .SelectMany(formationData => formationData.routeDatas.Select(x => x.data))
                .Sum(x => x.amount);
     this.now = this.max;
     this.Reflesh();
 }
Esempio n. 2
0
    /// <summary>
    /// construct
    /// </summary>
    public FishWaveDataController(Fish.ID id, FishWaveData master, float delay)
    {
        this.id = id;
        this.master = master;
        this.delay = delay;

        for (int i = 0; i < master.formationDatas.Count; i++)
        {
            this.id.formationId = (byte)i;

            var controller = new FormationDataController(
                id: this.id,
                master: this.master.formationDatas[i].data,
                delay: this.master.formationDatas[i].delay
            );
            controller.onFinished = this.OnFinishedFormation;

            this.formationDataControllers.Add(controller);
            this.loader.AddRange(controller.loader);
        }
    }