예제 #1
0
        public void setItem(IItem item, PlayerBattleTaskManager manager)
        {
            this.item    = item;
            this.manager = manager;

            nameText.text = item.getName();
        }
예제 #2
0
 /// <summary>
 /// 単体を目標とした初期設定
 /// </summary>
 /// <param name="target">担当するキャラクター</param>
 /// <param name="manager">元のBattleTaskManager</param>
 public void setState(IBattleable target, PlayerBattleTaskManager manager)
 {
     this.targets.Clear();
     this.targets.Add(target);
     this.manager    = manager;
     targetName.text = target.getName();
 }
예제 #3
0
 /// <summary>
 /// PlayerBattleTaskManagerをセットします
 /// </summary>
 /// <param name="manager"> セットしたいPlayerBattleTaskManager </param>
 public void setManager(PlayerBattleTaskManager manager)
 {
     if (!managerSetted)
     {
         this.manager = manager;
     }
     managerSetted = true;
 }
예제 #4
0
        /// <summary>
        /// 初期設定を行います
        /// </summary>
        /// <param name="move">前進は正の数、後退は負の数で移動先を設定します</param>
        /// <param name="manager">元のBattleTaskManager</param>
        public void setState(int move, PlayerBattleTaskManager manager)
        {
            this.pos     = move;
            this.manager = manager;

            if (move > 0)
            {
                areaName.text = move + "つ前進";
            }
            else if (move < 0)
            {
                areaName.text = -move + "つ後退";
            }
            else
            {
                throw new InvalidOperationException("zero moveness");
            }
        }
예제 #5
0
        /// <summary>
        /// 引数に渡したキャラクターをバトルに参加させます
        /// </summary>
        /// <param name="playable">参加させるキャラクター</param>
        /// <param name="pos">参加させる位置</param>
        public void joinBattle(IPlayable playable, FieldPosition pos)
        {
            if (!isBattleing)
            {
                throw new InvalidOperationException("battle isn't started");
            }

            loadContainer(playable);
            playable.setIsBattling(true);
            joinedCharacter [pos].Add(playable);
            playable.syncronizePositioin(field.getObjectPosition(pos, playable));

            GameObject view = MonoBehaviour.Instantiate((GameObject)Resources.Load("Prefabs/PlayerBattleTaskManager"));
            PlayerBattleTaskManager manager = view.GetComponent <PlayerBattleTaskManager> ();

            manager.setPlayer(playable, KeyCode.R);
            joinedManager.Add(playable.getUniqueId(), manager);
        }
예제 #6
0
 /// <summary>
 /// 初期設定をします
 /// </summary>
 /// <param name="manager"> 情報を取得するPlayerBattleTaskManager </param>
 /// <param name="skill"> 担当するスキル </param>
 public void setState(PlayerBattleTaskManager manager, IActiveSkill skill)
 {
     this.manager    = manager;
     this.skill      = skill;
     textObject.text = skill.getName();
 }
예제 #7
0
 /// <summary>
 /// このオブジェクトにBattleTaskListViewを設定します
 /// </summary>
 /// <param name="list">設定したいList</param>
 public void setListAndManager(BattleTaskListView list, PlayerBattleTaskManager manager)
 {
     this.list    = list;
     this.manager = manager;
 }
예제 #8
0
 public void setState(string name, PlayerBattleTaskManager manager)
 {
     stateText.text = name;
     this.manager   = manager;
 }
예제 #9
0
 /// <summary>
 /// 初期設定を行います
 /// </summary>
 /// <param name="skill">担当するスキル</param>
 /// <param name="manager">元のBattleTaskManager</param>
 public void setState(ReactionSkill skill, PlayerBattleTaskManager manager)
 {
     this.skill   = skill;
     text.text    = skill.getName();
     this.manager = manager;
 }
예제 #10
0
 /// <summary>
 /// エリアを目標とした初期設定
 /// </summary>
 /// <param name="pos">担当するエリア</param>
 /// <param name="manager">元のBattleTaskManager</param>
 public void setState(FieldPosition pos, PlayerBattleTaskManager manager)
 {
     this.pos        = pos;
     this.manager    = manager;
     targetName.text = Enum.GetName(typeof(FieldPosition), pos);
 }