예제 #1
0
 public CommandTrigger(Guid id, IReadOnlyList <Guid> inputProcessors, string cronDefintion, PlatformEvent platformEvent)
 {
     Id = id;
     _inputProcessors = inputProcessors;
     _cronDefintion   = cronDefintion;
     _platformEvent   = platformEvent;
 }
예제 #2
0
 public CommandTriggerCreated(Guid commandTriggerId, IReadOnlyCollection <Guid> inputProcessors, string cronDefinition, PlatformEvent platformEvent)
 {
     CommandTriggerId = commandTriggerId;
     InputProcessors  = inputProcessors;
     CronDefinition   = cronDefinition;
     PlatformEvent    = platformEvent;
 }
예제 #3
0
        public override Func0 hostAddCallback(String name, Func0 cb)
        {
            PlatformEvent cur;

            if (!platform_events.TryGetValue(name, out cur))
            {
                cur = null;
            }

            PlatformEvent ecb = () => {
                try {
                    cb();
                } catch (Exception e) {
                    Debug.WriteLine(e);
                }
            };

            platform_events[name] = cur + ecb;

            return(() => { platform_events[name] -= ecb; return null; });
        }
예제 #4
0
    public static void ChangeTime(double Time)
    {
        int bonus = 1;

        TimeLeft -= Time;
        if (TimeLeft <= 0)
        {
            if (ProjectCompletion >= 100)
            {
                bonus = 2;
            }
            finalScore = (double)((((Algorithms * 4) + 1) * ((PlatformSkill * 2.5) + 1)) * bonus);
            GameObject Hud = GameObject.Find("Hud");
            Hud.SetActive(false);


            Application.LoadLevel(2);
        }
        else
        {
            PlatformEvent.UpdateUI();
        }
    }
 public CommandTriggerPlatformEventUpdated(Guid commandTriggerId, PlatformEvent platformEvent)
 {
     CommandTriggerId = commandTriggerId;
     PlatformEvent    = platformEvent;
 }