public async Task <T> getSelection <T>(List <SelectButton <T> > buttons, string selectionTitle)
    {
        battleMenuUI = Instantiate(battleMenuUIPrefab, baseCanvas.transform);
        MenuButtonManager btnMgr = battleMenuUI.GetComponent <MenuButtonManager>();
        T resultVal = await btnMgr.getResultFromSelection(buttons, selectionTitle);

        GameObject.DestroyImmediate(battleMenuUI);
        return(resultVal);
    }
Exemplo n.º 2
0
 //[SerializeField] private RoomObjList roomObjList = default;
 // Start is called before the first frame update
 private void Awake()
 {
     _showCanPutMerchandise = FindObjectOfType <ShowCanPutMerchandise>();
     _menuButtonManager     = FindObjectOfType <MenuButtonManager>();
     _moveGoods             = moveGoodsObj.GetComponent <MoveGoods>();
     _menuButtonManager.InActivePutMerchandisePanel();
     _instancePrefab = new InstancePrefab();
     Debug.Log(" _showCanPutMerchandise: " + _showCanPutMerchandise);
     gameObject.SetActive(false);
 }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        playerRB   = commonCanvasVariables.playerRB.GetComponent <Rigidbody>();
        menuButton = GetComponent <MenuButtonManager>();

        if (playerRB == null)
        {
            throw new System.Exception("playerRB is set to null in script attached to " + this.gameObject.name);
        }
        dataGraph.pauseDataAppending = true;
    }
Exemplo n.º 4
0
        public void OnApplicationStart()
        {
            Log.Debug("OnApplicationStart");
            new GameObject("VisibleHitboxesController").AddComponent <VisibleHitboxesController>();
            _harmonyInstance = new Harmony("com.ryan.VisibleHitboxes");
            _harmonyInstance.PatchAll(Assembly.GetExecutingAssembly());

            if (Config.Instance.IsEnabled)
            {
                ScoreSubmission.ProlongedDisableSubmission(modName);
            }

            _menuButtonManager = new MenuButtonManager();
            _menuButtonManager.Setup();

            CreateMaterial();
            CreateCubeMesh();
        }
Exemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        switch (scene)
        {
        case ID.Scenes.startExperience:
        {
            _LoadingScreen = GameObjectTrigger;
            _slider        = GameObjectTrigger.GetComponentInChildren <Slider>();
            _LoadingScreen.SetActive(false);
            break;
        }

        case ID.Scenes.LoadVRGameObjects:
        {
            _TriggerLoadGameObjects = true;
            break;
        }

        case ID.Scenes.opening:
        {
            _OpeningManager = GameObjectTrigger.GetComponent <OpeningManager>();
            break;
        }

        case ID.Scenes.VR_A:
        {
            _MenuButtonManager = GameObjectTrigger.GetComponent <MenuButtonManager>();
            break;
        }
        // ADDING  MORE SCENES AS YOU NEED. REMENBER TO EDIT THE LoadSceneController
        //case ID.Scenes.VR_n:
        //    {

        //        break;
        //    }
        case ID.Scenes.ending:
        {
            _OpeningManager = GameObjectTrigger.GetComponent <OpeningManager>();
            break;
        }
        }
        _FadeOutTime = 0.5f;
        _FadeInTime  = 0.5f;
    }
Exemplo n.º 6
0
    private void Awake()
    {
        photonView = GetComponent <PhotonView>();
        if (photonView.IsMine)
        {
            gameManager              = FindObjectOfType <GameManager>();
            playerManager            = FindObjectOfType <PlayerManager>();
            menuButtonManager        = FindObjectOfType <MenuButtonManager>();
            talkPanelManager         = FindObjectOfType <TalkButtonManager>();
            playerActionUIController = FindObjectOfType <PlayerActionUIController>();
            _collider   = GetComponent <CapsuleCollider>();
            playerInput = GetComponent <PlayerInput>();

            _rpcState    = FindObjectOfType <RPCState>();
            _roomManager = FindObjectOfType <RoomManager>();
            token        = this.GetCancellationTokenOnDestroy();

            playerInput.ObserveEveryValueChanged(x => x.PushedAction)
            .Where(x => x)
            .Subscribe(_ =>
            {
                //基地編集中にはできないように
                if (_roomManager.MyRoomChildrenList.MoveGoodsObj.activeSelf)
                {
                    return;
                }
                switch (nextAction)
                {
                case ActionEnum.Dig:
                    playerManager.loadSceneCanvas.SetActive(true);
                    StartDig();
                    playerManager.currentPlayerState = PlayerState.Diging;
                    break;

                case ActionEnum.SpeakToNPC:
                    SpeakToNPC();
                    playerManager.currentPlayerState = PlayerState.Talking;
                    break;

                case ActionEnum.SpeakToPlayer:
                    SpeakToPlayer();
                    break;

                case ActionEnum.EnterRoom:
                    EnterRoom();
                    break;

                case ActionEnum.PickUpTrap:
                    PickUpTrap();
                    break;

                case ActionEnum.CheckObj:
                    CheckTree();
                    break;

                case ActionEnum.ExitRoom:
                    ExitRoom();
                    break;

                default:
                    break;
                }
                playerActionUIController.SetActionText("");
            })
            .AddTo(this);
        }
    }