Beispiel #1
0
        public void Initialize(TimeLine timeline)
        {
            List <TimelineSerializableData> timelineData = timeline.TimelineData;
            List <int> schedule = timeline.TimelineSchedule;

            for (int v = 0; v < SCHEDULE_SIZE; v++)
            {
                var item = BattleDictionary.GetTimelineById(timelineData, schedule[v]);
                AddCard(item);
            }
        }
Beispiel #2
0
        /// <summary>
        /// タイムラインを次に送る
        /// </summary>
        public AsyncSubject <Unit> TimelineNext()
        {
            AsyncSubject <Unit> subject = new AsyncSubject <Unit>();

            TimelineCalc();
            _timelineSchedule.Remove(_timelineSchedule.First());
            var id = TimeLineForward();

            _timelineView.DepopSchedule();
            _timelineView.AddCard(BattleDictionary.GetTimelineById(_timelineData, id)).Subscribe(_ =>
            {
                subject.OnNext(Unit.Default);
                subject.OnCompleted();
            });
            return(subject);
        }
Beispiel #3
0
    /// <summary>
    /// ターン開始
    /// </summary>
    private void TurnStart()
    {
        _disposableContainer = new IDisposableContainer();
        TimelineSerializableData timelineData =
            BattleDictionary.GetTimelineById(BattleGuiManager.Instance.Timeline.TimelineData, BattleGuiManager.Instance.Timeline.TimelineSchedule[0]);

        TurnAwake(timelineData.uniqId).Play().Subscribe(_ =>
        {
            ObservableUtils.Timer(300).Subscribe(__ =>
            {
                //行動不能判定
                if (StatusLogic.TurnSkipCheck(timelineData.uniqId))
                {
                    TurnEnd();
                }
                else
                {
                    //行動開始 アクターなら選択処理 エネミー、ミニオンならAI
                    BattlePresenter.GetInstance().BattlerSpriteModel.GetData(timelineData.uniqId).Active.OnNext(true);
                }
            });
        });
    }