Beispiel #1
0
        /// <summary>
        /// ターゲットを保存する
        /// </summary>
        /// <param name="isInvolve">ターゲットが指定されていても巻き込み設定がtrueの場合ターゲットに加える</param>
        public void ApplyTarget(Chara.ICharaController target, bool isInvolve)
        {
            var effectEntity = _skill.Effect;

            switch (effectEntity.Target)
            {
            // 関係なく登録
            case Const.TargetType.All:
            {
                _onTargetSubject.OnNext(target);
            }
            break;

            case Const.TargetType.Ally:
            case Const.TargetType.Enemy:
            {
                if (!isInvolve)
                {
                    var targetCharaType = _chara.Model.ConvertTargetCharaType(effectEntity.Target);
                    if (targetCharaType != target.Model.CharaType)
                    {
                        break;
                    }
                }

                _onTargetSubject.OnNext(target);
            }
            break;
            }
        }
Beispiel #2
0
        public void SetChara(Chara.ICharaController chara, int level)
        {
            var tilemap = FindTilemap(level);
            var mapData = _model.FindMapData(level);

            var charaModel = chara.Model;
            var charaView  = chara.View;

            charaModel.SetMapLevel(level, mapData);
            charaView.gameObject.SetActive(true);

            switch (charaModel.CharaType)
            {
            case Chara.CharaType.Player:
                charaView.transform.SetParent(_view.PlayerRoot, worldPositionStays: false);
                break;

            case Chara.CharaType.Enemy:
                _view.SetEnemy(charaView, level);
                break;

            default:
                Utility.Log.Error($"キャラタイプが設定されていません");
                break;
            }

            chara.SetTilemap(tilemap, level);
        }
Beispiel #3
0
        public virtual async UniTask ExecuteAsync(Chara.ICharaController unit, Utility.Async.WorkTimeAwaiter timeAwaiter)
        {
            _unit        = unit;
            _tileDataMap = null;
            _roomData    = null;

            await ExexuteInternalAsync(timeAwaiter);
        }
Beispiel #4
0
        public void Setup(Chara.ICharaController chara, SkillMaster skill, Map.SearchResult result)
        {
            _chara        = chara;
            _skill        = skill;
            _searchResult = result;

            // ターゲットの方を向く
            chara.Model.SetDirection(result.Dir.ToVec2Int());

            _impl = _diContainer.Instantiate <SkillCreateImpl>();
            _impl.Setup(chara, skill, _searchResult);
        }
Beispiel #5
0
        private List <Chara.ICharaController> _deadChara = new List <ICharaController>(); // 死んだキャラ

        #endregion


        #region プロパティ

        #endregion


        #region コンストラクタ, デストラクタ

        #endregion


        #region public, protected 関数

        public void Setup(Chara.ICharaController unit, List <Chara.ICharaController> deadChara)
        {
            _unit      = unit;
            _deadChara = deadChara;
        }
Beispiel #6
0
 public void Setup(Chara.ICharaController chara)
 {
     _chara = chara;
 }
Beispiel #7
0
 public void SetChara(Chara.ICharaController unit, bool ignoreIfNoTarget, in Vector2Int targetPos)
Beispiel #8
0
 public void SetTarget(Chara.ICharaController target)
 {
     //_target = target;
 }
Beispiel #9
0
 public void Setup(Chara.ICharaController chara, SkillMaster skill)
 {
     Setup(chara, skill, null);
 }
Beispiel #10
0
 public void Setup(Chara.ICharaController chara, SkillDamageEntity entity, List <Chara.ICharaController> targets)
 {
     _chara   = chara;
     _entity  = entity;
     _targets = targets;
 }
Beispiel #11
0
 public void Setup(Chara.ICharaController chara, SkillMaster skill, Map.SearchResult result)
 {
     _chara        = chara;
     _skill        = skill;
     _searchResult = result;
 }
Beispiel #12
0
 public void Setup(Chara.ICharaController chara, SkillHealEntity entity)
 {
     _chara  = chara;
     _entity = entity;
 }
Beispiel #13
0
 public void Setup(Chara.ICharaController chara, int exp)
 {
     _chara = chara;
     _exp   = exp;
 }
Beispiel #14
0
 public void SetCharaViewInCurrentMap(Chara.ICharaController chara) =>
 SetChara(chara, _model.CurrentMapIndex);
Beispiel #15
0
 public void Setup(Chara.ICharaController chara)
 {
     _enemy = chara as Chara.EnemyControl;
 }