예제 #1
0
        public void CompleteAssignment(AssignmentDriver driver)
        {
            driver.ActivationContext.FireEvent("complete");

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

            if (Updated != null)
            {
                Updated(this, EventArgs.Empty);
            }
        }
예제 #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]);
        }
예제 #4
0
        public void CompleteAssignment(AssignmentDriver driver)
        {
            driver.ActivationContext.FireEvent("complete");

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

            // TODO: make this configurable
            driver.Close();
        }
예제 #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);
            }
        }