Inheritance: INotifyObjectivesUpdated, ISync, IResolveOrder
Esempio n. 1
0
 public StrategicVictoryConditions(Actor self, StrategicVictoryConditionsInfo svcInfo)
 {
     info      = svcInfo;
     TicksLeft = info.TicksToHold;
     player    = self.Owner;
     mo        = self.Trait <MissionObjectives>();
 }
 public StrategicVictoryConditions(Actor self, StrategicVictoryConditionsInfo svcInfo)
 {
     info      = svcInfo;
     TicksLeft = info.HoldDuration;
     player    = self.Owner;
     mo        = self.Trait <MissionObjectives>();
     shortGame = player.World.WorldActor.Trait <MapOptions>().ShortGame;
 }
Esempio n. 3
0
        void PopulateObjectivesList(MissionObjectives mo, ScrollPanelWidget parent, ContainerWidget template)
        {
            parent.RemoveChildren();

            foreach (var o in mo.Objectives.OrderBy(o => o.Type))
            {
                var objective = o; // Work around the loop closure issue in older versions of C#
                var widget = template.Clone();

                var label = widget.Get<LabelWidget>("OBJECTIVE_TYPE");
                label.GetText = () => objective.Type == ObjectiveType.Primary ? "Primary" : "Secondary";

                var checkbox = widget.Get<CheckboxWidget>("OBJECTIVE_STATUS");
                checkbox.IsChecked = () => objective.State != ObjectiveState.Incomplete;
                checkbox.GetCheckType = () => objective.State == ObjectiveState.Completed ? "checked" : "crossed";
                checkbox.GetText = () => objective.Description;

                parent.AddChild(widget);
            }
        }
 public ConquestVictoryConditions(Actor self, ConquestVictoryConditionsInfo cvcInfo)
 {
     info = cvcInfo;
     mo   = self.Trait <MissionObjectives>();
 }
Esempio n. 5
0
 public ConquestVictoryConditions(Actor self, ConquestVictoryConditionsInfo cvcInfo)
 {
     info      = cvcInfo;
     mo        = self.Trait <MissionObjectives>();
     shortGame = self.Owner.World.WorldActor.Trait <MapOptions>().ShortGame;
 }
 public MissionObjectiveProperties(ScriptContext context, Player player)
     : base(context, player)
 {
     mo = player.PlayerActor.Trait<MissionObjectives>();
 }