Esempio n. 1
0
        public Character GetCharacter(PanelEntity target)
        {
            var panel = _stageModel.GetPanel(target);

            if (panel.GetCharacterId() == -1)
            {
                return(null);
            }

            var character = _residueCharacter.GetCharacter(panel.GetCharacterId());

            return(character ?? _residueEnemy.GetCharacter(panel.GetCharacterId()));
        }
Esempio n. 2
0
 public void EmitPanel(PanelEntity entity)
 {
     if (_load.Contains(entity))
     {
         foreach (var load in _load.Reverse())
         {
             if (load == entity)
             {
                 break;
             }
             _load.Remove(load);
         }
     }
     else
     {
         _load.Add(entity);
     }
 }
Esempio n. 3
0
        public DiceStageView Create(PanelEntity entity)
        {
            var random = new Random();
            var result = Enum.GetValues(typeof(DiceType))
                         .Cast <DiceType>()
                         .OrderBy(c => random.Next())
                         .FirstOrDefault();

            switch (result)
            {
            case DiceType.D3:
                return(_diceStageD3.Create(entity));

            case DiceType.D6:
                return(_diceStageD6.Create(entity));

            case DiceType.D8:
                return(_diceStageD8.Create(entity));

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 4
0
 public void EmitFirst(PanelEntity entity)
 {
     _load.Clear();
     _load.Add(entity);
 }
Esempio n. 5
0
 // キャラクターの離脱
 public void Escaped(PanelEntity target)
 {
     _stage[_stageHash[target.X][target.Y]].Escaped();
 }
Esempio n. 6
0
 // キャラクターの進入
 public void Invaded(Character character, PanelEntity target)
 {
     _stage[_stageHash[target.X][target.Y]].Invaded(character);
 }
Esempio n. 7
0
 // キャラクター移動完了 最終地点更新
 public void ModeEnd(PanelEntity panelEntity)
 {
     _moveEndPanel.OnNext(panelEntity);
 }
Esempio n. 8
0
 public PanelModel GetPanel(PanelEntity target)
 {
     return(_stage[_stageHash[target.X][target.Y]]);
 }
Esempio n. 9
0
 // 移動可能判定
 public bool Invasive(PanelEntity target)
 {
     return(_stage[_stageHash[target.X][target.Y]].Invasive());
 }
Esempio n. 10
0
 // 移動可能判定
 public bool Invasive(PanelEntity target)
 {
     return(_stageModel.Invasive(target));
 }
Esempio n. 11
0
 private void Escaped(PanelEntity target)
 {
     _stageModel.Escaped(target);
 }
Esempio n. 12
0
 private void Invaded(Character character, PanelEntity target)
 {
     _stageModel.Invaded(character, target);
 }
Esempio n. 13
0
 public PanelModel(int x, int y, int state, int id)
 {
     _entity      = new PanelEntity(x, y, state);
     _isTarget    = new ReactiveProperty <bool>(false);
     _characterId = id;
 }