private void Playing() { Time.timeScale = 1; LoseUI.SetActive(false); StartUI.SetActive(false); score.SetActive(true); }
void Start() { /*_stateMachines.Reset(); * _stateMachines.RegisterHandler();*/ _state = States.Begin; Time.timeScale = 0; StartUI.SetActive(true); LoseUI.SetActive(false); score.SetActive(false); }
public void Activate() { currentLevel = Level.lvl1; allowInputs = true; //countdownBar.maxValue = refillTime; currentState = State.Active; HUD.SetActive(true); StartUI.SetActive(false); Sun.gameObject.GetComponent <SunDawn>().SetActive(); ambient.Play(); }
void Start() { // This 2D array of ints will represent the ore values of the tiles. It's 32x32, padded by 1 on // all sides for easier checking of adjacents. ore = new int[34, 34]; mode = Mode.MINE; //gameUI.mineMode.interactable = false; oreScore = 0; // First we set all tiles to 0. for (int i = 0; i < 34; i++) { for (int j = 0; j < 34; j++) { ore[i, j] = 0; } } // Now we generate the starting positions of the ore deposits. int x1 = Random.Range(1, 33); int y1 = Random.Range(1, 33); int x2 = Random.Range(1, 33); int y2 = Random.Range(1, 33); int x3 = Random.Range(1, 33); int y3 = Random.Range(1, 33); int x4 = Random.Range(1, 33); int y4 = Random.Range(1, 33); int x5 = Random.Range(1, 33); int y5 = Random.Range(1, 33); ore[x1, y1] = 4; ore[x2, y2] = 4; ore[x3, y3] = 4; ore[x4, y4] = 4; ore[x5, y5] = 4; //DiamondScanAll(); //SquareScanAll(); //OrganicScanAll(); //GenerateGrid(); startUI = FindObjectOfType <StartUI>(); gameUI = FindObjectOfType <GameUI>(); gameUI.gameObject.SetActive(false); //Scans.text = "6"; Scans.text = scansLeft.ToString(); }
static void Main(string[] args) { Console.WriteLine("#=======================#"); Console.WriteLine("# Welcome to GradeBook! #"); Console.WriteLine("#=======================#"); Console.WriteLine(); StartUI.CommandPrompt(); Console.WriteLine("Closing GradeBook!"); Console.Read(); }
public override void Open(NavigationData data = null) { Instance = this; Application.logMessageReceived += LogCallback; _LogText.text = null; //Debug.Log("data path=" + Application.dataPath); //Debug.Log("streaming assets path=" + Application.streamingAssetsPath); //Debug.Log("persistent path=" + Application.persistentDataPath); //AudioManager.instance.PlayClip("Conversation.ogg"); UIManager.Instance.Open <TopResidentUI>(); base.Open(data); }
public void SetContagious() { allowInputs = true; //countdownBar.maxValue = -10; countDown = false; currentState = State.Contagious; HUD.SetActive(true); StartUI.SetActive(false); SickUI.SetActive(false); Sun.gameObject.GetComponent <SunDawn>().SetActive(); TimeCounter.gameObject.GetComponent <TimedownCounter>().SendMessage("SetContinueTime"); InfectionBar.SetActive(false); InfectionStatus.gameObject.GetComponent <Text>().text = "COVID POSITIVO"; InfectionStatus.gameObject.GetComponent <Text>().color = Color.red; playerSpeed = 3; ambient.Play(); }
public void PerformAction(int action) { menuSounds.Play(); if (action < 3) { menus[curMenu].SetActive(false); menus[action].SetActive(true); curMenu = action; } else if (action == 3) { StartUI.Game(); } else { StartUI.Exit(); } }
override protected void Start() { gameOverCount = 0.0f; CoinGetRate = 1f; scoreManager = GameObject.Find("ScoreManager").GetComponent <ScoreManager>(); GameObject playFabManager = GameObject.Find("PlayFabManager"); waitConnect = playFabManager.GetComponent <PlayFabWaitConnect>(); playerJump = Player.GetComponent <JumpAnimation>(); startUI = StartUIObject.GetComponent <StartUI>(); restartUI = ReStartUIObject.GetComponent <StartUI>(); adsButton = GameObject.Find("AdsButton").GetComponent <Button>(); base.Start(); state = STATE.PREPRATION; fadeState = FADE_STATE.BLACK; }
// Use this for initialization void Start() { var player = GameObject.FindWithTag("Player"); if (player != null) { ballController = player.GetComponent <BallController>(); } thirdPersonCamera = GetComponent <ThirdPersonCamera>(); if (GamePlayUIObject != null) { GamePlayUIObject.SetActive(false); } if (StartUIObject != null) { startUI = StartUIObject.GetComponent <StartUI>(); } SetTitleSequenceActive(true); }
void Update() { // Once Sally's placed, the plane she's stands on will be assigned to mainPlane. Then, Update is bypassed if (mainPlane != null) { return; } // When a plane with a decent size is detected, the cavas UI image and icod is changed for tap action if (!isDecentSizePlaneDetected && planeManager.trackables.count > 0) { foreach (var plane in planeManager.trackables) { // Default mininum width set to 25cm, lenght set to 70% of the width if (plane.extents.x > minExtentOfPlaneForTap && plane.extents.y > minExtentOfPlaneForTap * 0.7f) { StartUI uiScript = startUI.GetComponent <StartUI>(); uiScript.isMainPlaneDetected = true; isDecentSizePlaneDetected = true; } } } // Quit update routine in case of no touch input Touch touch; if (Input.touchCount < 1 || (touch = Input.GetTouch(0)).phase != TouchPhase.Began) { return; } // Raycast on the plane and place Sally when Sally is not visible in the beginning if (!isSallyVisible && isDecentSizePlaneDetected && arRaycaster.Raycast(touch.position, s_Hits, TrackableType.PlaneWithinPolygon)) { // Get Camera bearing(rotation without vertical component) and set main plane Pose hitPose = s_Hits[0].pose; Vector3 camForward = Camera.main.transform.forward; Vector3 camBearing = new Vector3(camForward.x, 0, camForward.z); mainPlane = planeManager.GetPlane(s_Hits[0].trackableId); //Play tapplace sound effect// SoundManagerScript.Play("tapplace"); // Make Sally visible on the plane and rotate her toward the Camera GameObject sally = GameObject.Find("skinnysally"); sallyScript s = sally.GetComponent <sallyScript>(); sally.transform.localScale = new Vector3(s.size, s.size, s.size); s.isVisible = true; isSallyVisible = true; sally.transform.position = hitPose.position; sally.transform.rotation = Quaternion.LookRotation(camBearing, mainPlane.normal); sally.transform.Rotate(0, 180, 0, Space.Self); // Match CylinderMask at sally's position and rotation and activate with the moving up direction true GameObject mask = GameObject.Find("CylinderMask"); mask.GetComponent <CylinderMask>().activate(sally, true); // Create AR Reference point(anchor) and parent it to Sally, Zero and Mask and deactivate UI and start the flow ARReferencePoint anchorRefPoint = refPointManager.AddReferencePoint(hitPose); GameObject anchor = anchorRefPoint.gameObject; sally.transform.parent = anchor.transform; GameObject zero = GameObject.Find("zero"); zero.transform.parent = anchor.transform; mask.transform.parent = anchor.transform; startUI.SetActive(false); inActivatePlanes(); Invoke("startFlow", 4.0f); } }
void Start() { //Set the max value to the refill time rb = GetComponent <Rigidbody>(); if (currentLevelInt == 0) { threshold_money = 3000; } else if (currentLevelInt == 1) { print("LVL2!"); threshold_money = 4000; StartUI.SetActive(false); HUD.SetActive(true); ambient.Play(); TimeCounter.gameObject.GetComponent <TimedownCounter>().SendMessage("ChangeFlag"); Sun.gameObject.GetComponent <SunDawn>().SetActive(); if (contagiusBool) { currentState = State.Contagious; threshold_money = threshold_money + 500 * (currentLevelInt + 1); totalmoney.text = threshold_money.ToString(); VirusEmitter.enableEmission = true; VirusEmitter.Play(); playerSpeed = 3; InfectionBar.SetActive(false); InfectionStatus.gameObject.GetComponent <Text>().text = "COVID POSITIVO"; InfectionStatus.gameObject.GetComponent <Text>().color = Color.red; } else { currentState = State.Active; } } else if (currentLevelInt == 2) { threshold_money = 5000; StartUI.SetActive(false); HUD.SetActive(true); allowInputs = true; ambient.Play(); //TimeCounter.gameObject.GetComponent<TimedownCounter>().SendMessage("ChangeFlag"); Sun.gameObject.GetComponent <SunDawn>().SetActive(); if (contagiusBool) { currentState = State.Contagious; threshold_money = threshold_money + 500 * (currentLevelInt + 1); totalmoney.text = threshold_money.ToString(); VirusEmitter.enableEmission = true; VirusEmitter.Play(); playerSpeed = 3; InfectionBar.SetActive(false); InfectionStatus.gameObject.GetComponent <Text>().text = "COVID POSITIVO"; InfectionStatus.gameObject.GetComponent <Text>().color = Color.red; } else { currentState = State.Active; } } totalmoney.text = threshold_money.ToString(); }
override public void OnEnter() { base.OnEnter(); startUI_ = UI.GetComponent <StartUI> (); }
void Start() { StartUI ui = m_uiObject.GetComponent <StartUI>(); _event.AddListener(ui.OnReceivedBroadcast); }