Inheritance: MonoBehaviour
コード例 #1
0
 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>();
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
    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);
    }
コード例 #4
0
 public void PurchaseBuilding()
 {
     if (!displayUI)
     {
         displayUI = GameObject.Find("UI").GetComponent <DisplayUI>();
     }
     if (displayUI.showBuildings)
     {
         spawnController2.EnableBuilding();
     }
 }
コード例 #5
0
    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;
    }
コード例 #6
0
    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);
    }
コード例 #7
0
    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;
    }
コード例 #8
0
ファイル: Spawner.cs プロジェクト: justtardis/EnemyGeneration
 private void Start()
 {
     _displayUI = gameObject.GetComponent <DisplayUI>();
 }
コード例 #9
0
 public Obs_UICommandChange(DisplayUI displayUI)
 {
     this.displayUI = displayUI;
     command        = GameManager.Instance().player.command;
 }
コード例 #10
0
ファイル: Manager.cs プロジェクト: rhhzero/Infinity-Rush
    // 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();
    }