// 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)); }
private void SetAllNavigationButtonNotClick() { doorButton.image.sprite = MediaPool.GetInstance().GetDoorButtonImage(false); libraryButton.image.sprite = MediaPool.GetInstance().GetLibraryButtonImage(false); cossButton.image.sprite = MediaPool.GetInstance().GetCossButtonImage(false); lakeButton.image.sprite = MediaPool.GetInstance().GetLakeButtonImage(false); }
private void SetupComponents() { GameObject pageAsset = PrefabPool.GetInstance().GetConfirmPage(); page = Instantiator.GetInstance().InstantiatePrefab(pageAsset); // Setup background Image confirmPage = page.transform.FindChild("BackgroundImage").gameObject.GetComponent <Image> (); confirmPage.sprite = MediaPool.GetInstance().GetFBConfirmPageImage(); // Link to remainingTimeText startTime = Timer.GetInstance().GetCurrentTime(); remainingTimeText = page.transform.FindChild("RemainingTimeText").gameObject.GetComponent <Text> (); remainingTimeText.text = "0"; }
private void SetupComponents() { GameObject pageAsset = PrefabPool.GetInstance().GetNavigationPage(); page = Instantiator.GetInstance().InstantiatePrefab(pageAsset); // Setup background Image doorNavigationPage = page.transform.FindChild("BackgroundImage").gameObject.GetComponent <Image> (); doorNavigationPage.sprite = MediaPool.GetInstance().GetCossNavigationImage(); // Link to remainingTimeText startTime = Timer.GetInstance().GetCurrentTime(); remainingTimeText = page.transform.FindChild("RemainingTimeText").gameObject.GetComponent <Text> (); remainingTimeText.text = "0"; endSession = false; }
private void SetupArrowAnimation() { arrow = page.transform.FindChild("Arrow").gameObject.GetComponent <Image> (); arrowAnimationIndex = 0; arrowAnimationTime = Timer.GetInstance().GetCurrentTime(); arrowAnimation = MediaPool.GetInstance().GetArrowAnimation(); arrow.sprite = arrowAnimation[arrowAnimationIndex]; arrowPositions = new Dictionary <Place, Vector2> (); arrowPositions.Add(Place.DOOR, new Vector2(-48, -40)); arrowPositions.Add(Place.LIBRARY, new Vector2(330, 75)); arrowPositions.Add(Place.COSS, new Vector2(180, 250)); arrowPositions.Add(Place.LAKE, new Vector2(-130, 40)); arrowRotations = new Dictionary <Place, Quaternion> (); arrowRotations.Add(Place.DOOR, Quaternion.Euler(0, 0, 150)); arrowRotations.Add(Place.LIBRARY, Quaternion.Euler(0, 0, 180)); arrowRotations.Add(Place.COSS, Quaternion.Euler(0, 0, 330)); arrowRotations.Add(Place.LAKE, Quaternion.Euler(0, 0, 0)); }
public void SetNavigationButtonClick(Place navigationButton) { SetAllNavigationButtonNotClick(); switch (navigationButton) { case Place.DOOR: doorButton.image.sprite = MediaPool.GetInstance().GetDoorButtonImage(true); break; case Place.LIBRARY: libraryButton.image.sprite = MediaPool.GetInstance().GetLibraryButtonImage(true); break; case Place.COSS: cossButton.image.sprite = MediaPool.GetInstance().GetCossButtonImage(true); break; case Place.LAKE: lakeButton.image.sprite = MediaPool.GetInstance().GetLakeButtonImage(true); break; } }