Exemplo n.º 1
0
        public void CompleteAssignment(AssignmentDriver driver)
        {
            driver.ActivationContext.FireEvent("complete");

            if (Updated != null)
            {
                Updated(this, EventArgs.Empty);
            }
        }
Exemplo n.º 2
0
        public void CloseAssignment(AssignmentDriver driver)
        {
            driver.ActivationContext.Close();

            if (Updated != null)
            {
                Updated(this, EventArgs.Empty);
            }
        }
Exemplo n.º 3
0
        public IEnumerable <IPlayerTaskDriver> GetActiveObjectiveTasks(AssignmentDriver adriver)
        {
            if (adriver.Assignment.Objectives != null)
            {
                return(adriver.Assignment.Objectives
                       .Where(o => !IsObjectiveComplete(o.Objective))
                       .Select(o => GetTaskDriverForObjective(o.Objective))
                       .Where(d => d != null));
            }

            return(new IPlayerTaskDriver[0]);
        }
Exemplo n.º 4
0
        public void CompleteAssignment(AssignmentDriver driver)
        {
            driver.ActivationContext.FireEvent("complete");

            if (Updated != null)
            {
                Updated(this, EventArgs.Empty);
            }

            // TODO: make this configurable
            driver.Close();
        }
Exemplo n.º 5
0
        public void ActivateAssignment(ResourceActivationContext context, Assignment assignment)
        {
            var driver = new AssignmentDriver(context, assignment);

            m_assignments.Add(context.InstanceId, driver);

            driver.CheckComplete();

            if (Updated != null)
            {
                Updated(this, EventArgs.Empty);
            }
        }