Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        // Pre-loading
        PrefabPool.GetInstance();
        MediaPool.GetInstance();

        stateController = new StateController("192.168.137.1", 50000);
        stateController.SetListener(this);

//		wormholeReceiver = new WormholeImageReceiver ();
//		wormholeReceiver.SetListener (this);

        directorTask     = null;
        directorTaskLock = new System.Object();

        emailSender = new EmailSender();

        pageStack = new Stack <Page> ();
        pageStack.Push(new MainPage(this));
//		pageStack.Push (new DoorNavigationPage (this));
//		pageStack.Push (new WebPage (this));
//		pageStack.Push (new WormholePage(this));
//		pageStack.Push (new EmailInputPage (this));
//		pageStack.Push (new EndPage (this));
    }
Beispiel #2
0
    // Update is called once per frame
    void Update()
    {
        lock (directorTaskLock) {
            if (directorTask != null)
            {
                directorTask.Action(this);
                directorTask = null;
            }
        }
        if (pageStack.Count == 0)
        {
            Debug.Log("NO PAGE IN DIRECTOR!!");
        }
        else
        {
            pageStack.Peek().Update();
        }

        DebuggingCode();
    }
Beispiel #3
0
 public void AssignTask(DirectorTask newTask)
 {
     lock (directorTaskLock) {
         directorTask = newTask;
     }
 }