// Use this for initialization void Start() { Input.gyro.enabled = true; finished = false; spot = GlobalConstants.locations [GlobalConstants.SPOT_NAME]; textComp = GetComponent <Text>(); // use "this" monobehaviour as the coroutine owner queue = new CoroutineQueue(this); queue.StartLoop(); System.Random rnd = new System.Random(System.DateTime.Now.Millisecond); tipTimes = rnd.Next(1, 4); // 1 2 3 tips = new Stack <Orientation> (); for (int i = 0; i < tipTimes; ++i) { tips.Push((Orientation)rnd.Next(0, 4)); } lastTip = Orientation.None; currentTip = tips.Pop(); rotationSinceLastTip = 0.0f; secondSinceLastTip = 0.0f; Debug.Log("Acceleration: current tip " + currentTip); queue.EnqueueAction(TypeText(tipString [(int)currentTip])); queue.EnqueueWait(sentencePause); }
// ************************** // Public functions // ************************** public void Start() { m_results = new List <Result>(); for (int i = 0; i < m_resultObjects.Length; i++) { m_results.Add(new Result()); } m_coroutineQueue = new CoroutineQueue(this); m_coroutineQueue.StartLoop(); m_backEndAPI = new BackEndAPI(this, m_user.GetErrorMessage(), m_user); m_searchInputText = m_searchInput.GetComponentInChildren <Text>(); m_searchState = SearchState.kNone; m_currSearchString = ""; HideAllResults(); m_menuController.RegisterToUseMenuConfig(this); MenuController.MenuConfig menuConfig = m_menuController.GetMenuConfigForOwner(this); menuConfig.menuBarVisible = true; menuConfig.imageSpheresVisible = true; menuConfig.subMenuVisible = true; }
void Start() { SetupBoard(); SetupNewGame(); animationQueue.m_Owner = this; animationQueue.StartLoop(); playerDeckManager.DrawCard(5); }
// ************************** // Public functions // ************************** public void Start() { m_commentResults = new List <CommentResult>(); m_coroutineQueue = new CoroutineQueue(this); m_coroutineQueue.StartLoop(); m_backEndAPI = new BackEndAPI(this, m_user.GetErrorMessage(), m_user); }
// ************************** // Public functions // ************************* public void Start() // NOTE: Due to current underlying C++ implementation being single threaded, there can only be one of these { m_cppPlugin = new CppPlugin(this, kMaxNumTextures); m_textureIndexUsage = new int[kMaxNumTextures]; m_coroutineQueue = new CoroutineQueue(this); m_coroutineQueue.StartLoop(); m_threadJob = new ThreadJob(this); }
// ************************** // Public functions // ************************** public void Start() { m_coroutineQueue = new CoroutineQueue(this); m_coroutineQueue.StartLoop(); ForceHideAllImageSpheres(); SetIndexOnAllImageSpheres(); m_imagesTopLevelDirectory = "InvalidTopLevelDirectory"; }
public void Start() { m_pictureFilePaths = new List <string>(); m_coroutineQueue = new CoroutineQueue(this); m_coroutineQueue.StartLoop(); m_threadJob = new ThreadJob(this); m_cppPlugin = new CppPlugin(this); }
private void Start() { onMessageRequest += GotMessageRequest; // Setup Message Action Queue messageQueue = new CoroutineQueue(this); messageQueue.StartLoop(); // Setup MessageText pool messagePool = gameObject.AddComponent <MessageTextPool>(); messagePool.objectPrefab = Resources.Load <MessageTextUI>("UI/MessageText"); }
// ************************** // Public functions // ************************** public void Start() { m_coroutineQueue = new CoroutineQueue(this); m_coroutineQueue.StartLoop(); m_backEndAPI = new BackEndAPI(this, m_user.GetErrorMessage(), m_user); m_menuController.RegisterToUseMenuConfig(this); MenuController.MenuConfig menuConfig = m_menuController.GetMenuConfigForOwner(this); menuConfig.menuBarVisible = true; menuConfig.subMenuVisible = true; m_menuController.UpdateMenuConfig(this); }
// ************************** // Public functions // ************************** public void Start() { m_coroutineQueue = new CoroutineQueue(this); m_coroutineQueue.StartLoop(); m_backEndAPI = new BackEndAPI(this, m_user.GetErrorMessage(), m_user); m_imageSubMenu.SetActive(false); m_menuController.RegisterToUseMenuConfig(this); MenuController.MenuConfig menuConfig = m_menuController.GetMenuConfigForOwner(this); menuConfig.menuBarVisible = false; menuConfig.imageSpheresVisible = false; menuConfig.subMenuVisible = false; }
// ************************** // Public functions // ************************** public void Start() { AndroidJNI.AttachCurrentThread(); m_javaPluginClass = new AndroidJavaClass("io.vreel.vreel.JavaPlugin"); m_galleryImageFilePaths = new List <string>(); m_coroutineQueue = new CoroutineQueue(this); m_coroutineQueue.StartLoop(); m_threadJob = new ThreadJob(this); m_backEndAPI = new BackEndAPI(this, m_user.GetErrorMessage(), m_user); m_uploadConfirmation.SetActive(false); }
// ************************** // Public functions // ************************** public void Start() { // Version dependent code m_vreelAnalyticsFile = GetSaveFile(); m_analyticsFilePath = Application.persistentDataPath + m_vreelAnalyticsFile; m_analyticsData = new AnalyticsData(); m_analyticsData.m_uid = ""; m_threadJob = new ThreadJob(this); m_coroutineQueue = new CoroutineQueue(this); m_coroutineQueue.StartLoop(); m_coroutineQueue.EnqueueAction(IdentifyInternal()); }
void Awake() { Current = this; mainQueue = new CoroutineQueue(this); mainQueue.StartLoop(); combineQueue = new CoroutineQueue(this); combineQueue.StartLoop(); miscQueue = new CoroutineQueue(this); miscQueue.StartLoop(); objectGenerator = ScriptableObject.CreateInstance <ObjectGenerator>(); ChunkList = new List <ChunkData>(); }
// ************************** // Public functions // ************************** public void Start() { m_coroutineQueue = new CoroutineQueue(this); m_coroutineQueue.StartLoop(); if (m_menuConfigList == null) { m_menuConfigList = new List <MenuConfig>(); } m_lastMenuConfig = new MenuConfig(); m_lastMenuConfig.owner = null; m_lastMenuConfig.menuVisible = true; // We don't want keyboard.Hide() to get called early on... m_lastMenuConfig.menuBarVisible = false; m_lastMenuConfig.imageSpheresVisible = false; m_lastMenuConfig.subMenuVisible = false; m_menuConfigChanged = new MenuConfigChanged(); }
private void Start() { _queue = new CoroutineQueue(this); _queue.StartLoop(); _queue.EnqueueAction(ShowStatusMessage("Press space to roll the dice")); _cameraController = GameObject.Find("CameraController").GetComponent <CameraController>(); _buyProperty = GameObject.Find("BuyUI").GetComponent <BuyProperty>(); socketIo.PlayerJoined += SocketIoOnPlayerJoined; socketIo.PlayerLeft += SocketIoOnPlayerLeft; socketIo.PlayerRolledDice += SocketIoOnPlayerRolledDice; socketIo.PlayerMoved += SocketIoOnPlayerMoved; socketIo.PlayerTurnChanged += SocketIoOnPlayerTurnChanged; socketIo.PlayerPlaysAgain += SocketIoOnPlayerPlaysAgain; socketIo.PlayerBalanceChanged += SocketIoOnPlayerBalanceChanged; socketIo.PlayerSteppedOnChance += SocketIoOnPlayerSteppedOnChance; socketIo.PlayerSteppedOnCommunityChest += SocketIoOnPlayerSteppedOnCommunityChest; socketIo.PropertyOwnerChanged += SocketIoOnPropertyOwnerChanged; UpdateOwnedProperties(); UpdateBottomBar(); SetupPlayers(); foreach (Transform child in players.transform) { if (child != players.transform) { playerList.Add(child.gameObject); } } var player = Player.GetPlayerById(GameManager.Instance.Game.CurrentPlayerId); UpdateBottomBarPlayerPlaying(player); _cameraController.SetUpCameras(); }
// ************************** // Public functions // ************************** public void Start() { UnityEngine.Random.InitState((int)System.DateTime.Now.Ticks); // Version dependent code m_vreelSaveFile = GetSaveFile(); m_dataFilePath = Application.persistentDataPath + m_vreelSaveFile; m_loginData = new LoginData(); m_loginData.m_client = m_loginData.m_uid = m_loginData.m_accessToken = ""; m_id = m_handle = m_email = m_name = m_profileDescription = ""; m_backEndAPI = new BackEndAPI(this, m_errorMessage, this); m_coroutineQueue = new CoroutineQueue(this); m_coroutineQueue.StartLoop(); m_threadJob = new ThreadJob(this); m_loadingLoginData = true; m_coroutineQueue.EnqueueAction(LoadLoginData()); }
private void Start() { sizingQueue = new CoroutineQueue(this); sizingQueue.StartLoop(); }
// ************************** // Public functions // ************************** public void Awake() { m_imageSphereTexture = new Texture2D(2, 2); // TODO Create a default texture for loading showing the VReel logo m_coroutineQueue = new CoroutineQueue(this); m_coroutineQueue.StartLoop(); }
// [update location, check distance] // #1 >= 20 miles // you are too far... [change text] // get ready for a journey [change text] // see you in [city] [change text] // [return to MainUI] // #2 < 20 miles // see you in [location] // #3 < 5 miles // put on your running shoes or hop on your bike [change text, update location] // [update location, check distance in a loop, when half than initialized distance] // you are getting closer now // [update location, check distance in a loop, when < 100 feet] // congratulations! you made it!!! [change scene, open camera] // #4 < 100 feet // Be ready to see [spot]!!! IEnumerator Start() { textComp = GetComponent <Text>(); // use "this" monobehaviour as the coroutine owner queue = new CoroutineQueue(this); queue.StartLoop(); mState = LocationState.Disabled; mLatitude = 0.0f; mLongitude = 0.0f; mDistance = 0.0f; spot = GlobalConstants.locations [GlobalConstants.SPOT_NAME]; if (Input.location.isEnabledByUser) { // Start service before querying location Input.location.Start(); // Wait until service initializes int maxWait = 20; while (Input.location.status == LocationServiceStatus.Initializing && maxWait > 0) { yield return(new WaitForSeconds(1)); maxWait--; } // Service didn't initialize in 20 seconds if (maxWait < 1) { mState = LocationState.TimedOut; } else if (Input.location.status == LocationServiceStatus.Failed) { mState = LocationState.Failed; } else { mState = LocationState.Enabled; mLatitude = Input.location.lastData.latitude; mLongitude = Input.location.lastData.longitude; // mHorizontalAccuracy = Input.location.lastData.horizontalAccuracy; // mTimestamp = Input.location.lastData.timestamp; mDistance = Haversine(); } } if (mState == LocationState.Enabled) { float mileTemp = mDistance * KM_2_MILE; float footTemp = mDistance * KM_2_FOOT; if (mileTemp > 20.0f) { queue.EnqueueAction(TypeText("you are too far...")); queue.EnqueueWait(sentencePause); queue.EnqueueAction(TypeText("get ready for a journey")); queue.EnqueueWait(sentencePause); queue.EnqueueAction(TypeText("see you in " + spot.GetCity())); Input.location.Stop(); mState = LocationState.Stopped; } else if (mileTemp > 5.0f) { queue.EnqueueAction(TypeText("see you in " + spot.GetMuseum())); queue.EnqueueWait(sentencePause); } else if (footTemp > 100.0f) { queue.EnqueueAction(TypeText("put on your running shoes or hop on your bike")); queue.EnqueueWait(sentencePause); } else { queue.EnqueueAction(TypeText("Be ready to see " + spot.GetName())); queue.EnqueueWait(sentencePause); queue.EnqueueAction(ChangeScene("GeoCamera")); // this need to change scene Input.location.Stop(); mState = LocationState.Stopped; } } else if (mState == LocationState.Disabled) { queue.EnqueueAction(TypeText("Location service not enabled")); } else if (mState == LocationState.Failed) { queue.EnqueueAction(TypeText("Unable to determine device location")); } else if (mState == LocationState.TimedOut) { queue.EnqueueAction(TypeText("Sorry! Timed out")); } }