private void Start() { if (Serializer.IsLoading) { return; } displayUI = transform.parent.transform.parent.GetComponent <DisplayUI>(); economyManager = GameObject.Find("Managers").GetComponent <EconomyManager>(); thumb = transform.parent.transform.parent.GetComponent <ThumbTracker>(); }
private void OnTriggerEnter(Collider trig) { // Debug.Log("Touch the end of the level!"); if (trig.gameObject.tag == "Player") { PlayerMovement_3D.collected_coin = true; Debug.Log("+1 to collected peices, yay"); DisplayUI.collectedShard(); Destroy(gameObject); } }
public override void Enter(StateMachine stateMachine) { Debug.Log("필드전"); base.Enter(stateMachine); displayUI = GameManager.Instance().displayUI; displayUI.fieldMenu.SetActive(true); GameManager.Instance().debri.SetActive(true); GameManager.Instance().player.gameObject.SetActive(true); }
public void PurchaseBuilding() { if (!displayUI) { displayUI = GameObject.Find("UI").GetComponent <DisplayUI>(); } if (displayUI.showBuildings) { spawnController2.EnableBuilding(); } }
void UpdateContainedBuilding(GameObject newBuilding) { if (!displayUI) { displayUI = transform.parent.transform.parent.gameObject.GetComponent <DisplayUI>(); } menuSelection = displayUI.GetSelection(); containedBuilding = newBuilding; containedRenderer = containedBuilding.GetComponent <Renderer>(); containedType = menuSelection; showingBuilding = true; }
public override void Enter(StateMachine stateMachine) { Debug.Log("환경설정"); base.Enter(stateMachine); displayUI = GameManager.Instance().displayUI; unit1 = new Obs_UICommandChange(displayUI);// 조작키 설정 displayUI.AddObserver(unit1); displayUI.OnNotify(); displayUI.optionMenu.SetActive(true); GameManager.Instance().debri.SetActive(false); GameManager.Instance().player.gameObject.SetActive(false); }
bool trackingPosition; // controls position tracker coroutine private void Start() // Sets up references { if (Serializer.IsDeserializing) { return; } if (Serializer.IsLoading) { return; } angleIncrement = 0; swipeReq = 0.2f; controller = GameObject.Find("LeftController"); events = controller.GetComponent <VRTK_ControllerEvents>(); displayUI = GetComponent <DisplayUI>(); spawnManager = GameObject.Find("Managers").GetComponent <SpawnManager>(); events.TouchpadTouchEnd += StopTracking; }
private void Start() { _displayUI = gameObject.GetComponent <DisplayUI>(); }
public Obs_UICommandChange(DisplayUI displayUI) { this.displayUI = displayUI; command = GameManager.Instance().player.command; }
// Instantiate variables and references here void Awake() { // Initialize the manager objects Instance = this; player = GameObject.FindObjectOfType<Player>(); levelManager = GameObject.FindObjectOfType<LevelHandler>(); // Initialize all UI menu object references menuManager = GameObject.FindObjectOfType<MenuHandler>(); mainMenu = menuManager.getMenu("MainMenuScreen"); pauseMenu = menuManager.getMenu("PauseScreen"); restartMenu = menuManager.getMenu("ResetScreen"); storeMenu = menuManager.getMenu("StoreScreen"); creditsMenu = menuManager.getMenu("CreditsScreen"); leaderboardMenu = menuManager.getMenu("LeaderboardScreen"); menuFader = GameObject.Find("CanvasTransition").GetComponent<CanvasGroup>(); displayBoard = GameObject.FindObjectOfType<DisplayUI>(); // Initialize full screen effects here cameraMotionBlur = GameObject.FindObjectOfType<CameraMotionBlur>(); // Fader UI object visible on start menuFader.alpha = 1.0f; // Initialize default game state moneyMultiplier = 1.0f; distanceRecord = 500.0f; initializeCameraEffects(); initializeMainMenu(); }