示例#1
0
        public Combat(CombatMap map)
            : base()
        {
            Map = map;

            Phases = new Dictionary<EState, Phase>()
            {
                { EState.Placement,             new Placement(this) },
                { EState.Starting,              new Starting(this) },
                { EState.TurnStart,             new TurnStart(this) },
                { EState.ActionSelection,       new ActionSelection(this) },
                { EState.MoveCellSelection,     new MoveCellSelection(this) },
                { EState.ExploreCellSelection,  new ExploreCellSelection(this) },
                { EState.AttackCellSelection,   new AttackCellSelection(this) },
                { EState.SpellCellSelection,    new SpellCellSelection(this) },
                { EState.ItemCellSelection,     new ItemCellSelection(this) },
                { EState.Fury,                  new Fury(this) },
                { EState.TurnOver,              new TurnOver(this) },
                { EState.Over,                  new Over(this) }
            };

            Logger = new CombatLogger();

            Teams = new List<Team>();
            Combatants = new List<BaseCombatant>();

            CellSet = new CombatCellSet(Map);

            ActionMenu = new CombatActionMenu(this);
            MainMenu = new CombatMainMenu(this);
            SpellMenu = new SpellMenu(this);
            ActionMenu.AttachSpellMenu(SpellMenu);

            Cursor = new CombatCursor(this);
            AttachViewToCursor();

            InfoPanel = new CombatInfoPanel(this);
            InfoPanel.AddBox(new CombatantInfoPanelBox());

            CombatantOrder = new CombatantQueue();

            ChangeState(EState.Placement, null, true);
        }
示例#2
0
        //!\\ TODO (test phase) //!\\
        public override void Init(ScreenArgs args = null)
        {
            base.Init(args);

            Map = new CombatMap(args.Get<Map>("Map"));

            Gui.AddGameWidget(Fps);

            Gui.AddGameWidget(Map.Combat.MainMenu);
            Gui.AddGameWidget(Map.Combat.ActionMenu);
            Gui.AddGameWidget(Map.Combat.SpellMenu);
            Gui.AddGameWidget(Map.Combat.Cursor);

            Map.Combat.InfoPanel.SetLocation(GameWidget.ELocation.BottomRight);
            Gui.AddGameWidget(Map.Combat.InfoPanel);
            Map.Combat.MainMenu.SetLocation(GameWidget.ELocation.BottomLeft);

            Gui.SetFirst(Map.Combat.Cursor);
        }
示例#3
0
 public void SetMap(CombatMap map)
 {
     Map = map;
 }