コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: yxh1990/PsyHealth
 public MainWindow()
 {
     InitializeComponent();
     AppPropertys.mainWindow = this;
     AppPropertys.Initialize();
     PlayController.Initialize();
 }
コード例 #2
0
	// Use this for initialization
	void Start () {
		sound = GetComponent<AudioSource>();
		sound.Play ();

		// Playコントローラーがない場合は無条件でメニュー画面に戻る
		GameObject playController = GameObject.FindWithTag ("PlayController");
		if (playController == null) {
			SceneManager.LoadScene ("menu");
			return;
		}
		play = playController.GetComponent<PlayController>();

		// Playコントローラーがない場合は無条件でメニュー画面に戻る
		bentoObj1 = GameObject.FindWithTag ("BentoObj");
		if (bentoObj1 == null) {
			SceneManager.LoadScene ("menu");
			return;
		}
		bentoObj1.transform.localScale = new Vector3 (0.15f, 0.15f, transform.localScale.z);

		bentoObj1.transform.position = new Vector3 (0.0f, -1.5f, transform.localScale.z);
		bentoObj2 = (GameObject)Instantiate (bentoObj1, new Vector3 (-2.55f, -1.5f, 0.0f), Quaternion.identity);
		bentoObj3 = (GameObject)Instantiate (bentoObj1, new Vector3 (2.55f, -1.5f, 0.0f), Quaternion.identity);

		Invoke ("ShowFab", 8.0f);
		Invoke ("ShowResult", 8.0f);
		Invoke ("ChangeScene", sound.clip.length + 0.5f);
	}
コード例 #3
0
    // Use this for initialization
    void Start()
    {
        sound = GetComponent <AudioSource>();
        sound.Play();

        // Playコントローラーがない場合は無条件でメニュー画面に戻る
        GameObject playController = GameObject.FindWithTag("PlayController");

        if (playController == null)
        {
            SceneManager.LoadScene("menu");
            return;
        }
        play = playController.GetComponent <PlayController>();

        // Playコントローラーがない場合は無条件でメニュー画面に戻る
        bentoObj1 = GameObject.FindWithTag("BentoObj");
        if (bentoObj1 == null)
        {
            SceneManager.LoadScene("menu");
            return;
        }
        bentoObj1.transform.localScale = new Vector3(0.15f, 0.15f, transform.localScale.z);

        bentoObj1.transform.position = new Vector3(0.0f, -1.5f, transform.localScale.z);
        bentoObj2 = (GameObject)Instantiate(bentoObj1, new Vector3(-2.55f, -1.5f, 0.0f), Quaternion.identity);
        bentoObj3 = (GameObject)Instantiate(bentoObj1, new Vector3(2.55f, -1.5f, 0.0f), Quaternion.identity);

        Invoke("ShowFab", 8.0f);
        Invoke("ShowResult", 8.0f);
        Invoke("ChangeScene", sound.clip.length + 0.5f);
    }
コード例 #4
0
	// Use this for initialization
	void Start () {
		AudioSource[] audioSources = GetComponents<AudioSource>();
		BGM = audioSources[0];
		BGMonVoice = audioSources[1];
		BGMonVoice.Play ();
		Invoke ("PlayNoVoice", BGMonVoice.clip.length);

		// メインBGMを止める
		GameObject obj = GameObject.FindWithTag ("MainBgmController");
		if (obj != null) {
			GameObject.Destroy (obj);
		}

		buttonCloseMenuCol.enabled = false;

		// Playコントローラーがある場合は削除してからインスタンス生成する
		GameObject obj2 = GameObject.FindWithTag ("PlayController");
		if (obj2 != null) {
			GameObject.Destroy (obj2);
		}
		playController = (GameObject)Instantiate (playControllerPrefab);
		play = playController.GetComponent<PlayController>();

		// お題表示
		Invoke ("ShowFab", 6.0f);
	}
コード例 #5
0
ファイル: Program.cs プロジェクト: LuisMRMoreira/GrpcRPCGame
        static void Main()
        {
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            //HttpClient client = new HttpClient();
            //HttpResponseMessage response = await client.GetAsync("http://localhost:8080/accounts/");
            //response.EnsureSuccessStatusCode();

            AuthView                     = new AuthView();
            ConnectView                  = new ConnectView();
            LoginView                    = new LoginView();
            PlayView                     = new PlayView();
            RegisterView                 = new RegisterView();
            CreditBankMenurView          = new CreditBankMenuView();
            CreditBankAuthenticationVIew = new CreditBankAuthenticationVIew();

            AuthController       = new AuthController();
            ConnectController    = new ConnectController();
            PlayController       = new PlayController();
            AuthController       = new AuthController();
            CreditBankController = new CreditBankController();

            Application.Run(ConnectView);
        }
 public BoardView(PlayController playController)
 {
     this._playController          = playController;
     this._secretCombinationView   = new SecretCombinationView(this._playController);
     this._proposedCombinationView = new ProposedCombinationView(this._playController);
     this._resultView = new ResultView(this._playController);
 }
コード例 #7
0
        public void PrivateBoardClear_EqualTrue()
        {
            PlayController playController = new PlayController();

            PrivateObject privateObject = new PrivateObject(playController);

            ICheckersCell[] checkersCell = new ICheckersCell[]
            {
                null, null, null, null,
                null, null, null, null,
                null, null, null, null,
                null, null, null, null,
                null, null, null, null,
                null, null, null, null,
                null, null, null, null,
                null, null, null, null,
            };

            privateObject.Invoke("BoardClear");

            IBoard board = (IBoard)(privateObject.GetFieldOrProperty("Board"));

            for (int i = 1; i <= board.Size; i++)
            {
                Assert.AreEqual(checkersCell[i - 1], board[i]);
            }
        }
コード例 #8
0
 void Awake()
 {
     base.Awake();
     perfilController = GetComponent <PerfilController>();
     playController   = GetComponent <PlayController>();
     sesionController = GetComponent <SesionController>();
 }
コード例 #9
0
 private void TextBlock_MouseDown_2(object sender, MouseButtonEventArgs e)
 {
     if (e.ChangedButton == MouseButton.Left)
     {
         PlayController.PlayNext();
     }
 }
コード例 #10
0
 /// <summary>
 /// Configuration of app
 /// </summary>
 public void Configuration(IAppBuilder app)
 {
     JoinController.Configure(app);
     MasterController.Configure(app);
     VotingController.Configure(app);
     PlayController.Configure(app);
 }
コード例 #11
0
    // Use this for initialization
    void Start()
    {
        AudioSource[] audioSources = GetComponents <AudioSource>();
        BGM         = audioSources[0];
        BGMonVoice  = audioSources[1];
        voiceFinish = audioSources[2];

        BGMonVoice.Play();
        Invoke("PlayNoVoice", BGMonVoice.clip.length);

        buttonYesCol.enabled = false;
        buttonNoCol.enabled  = false;

        // Playコントローラーがない場合は無条件でメニュー画面に戻る
        GameObject playController = GameObject.FindWithTag("PlayController");

        if (playController == null)
        {
            SceneManager.LoadScene("menu");
            return;
        }
        play = playController.GetComponent <PlayController>();

        // 表示
        play.InitObj();
        play.Show(-1);
    }
コード例 #12
0
 private void Image_MouseDown(object sender, MouseButtonEventArgs e)
 {
     if (e.ChangedButton == MouseButton.Left)
     {
         PlayController.setMute();
     }
 }
コード例 #13
0
 public PlayControllerTest()
 {
     wordsRepositoryMock = new Mock <IWordsRepository>();
     gameLogicMock       = new Mock <IGameLogic>();
     ghostPlayerMock     = new Mock <IGhostPlayer>();
     controller          = new PlayController(wordsRepositoryMock.Object, gameLogicMock.Object, ghostPlayerMock.Object);
 }
コード例 #14
0
    // Use this for initialization
    void Start()
    {
        AudioSource[] audioSources = GetComponents <AudioSource>();
        BGM        = audioSources[0];
        BGMonVoice = audioSources[1];
        BGMonVoice.Play();
        Invoke("PlayNoVoice", BGMonVoice.clip.length);

        // メインBGMを止める
        GameObject obj = GameObject.FindWithTag("MainBgmController");

        if (obj != null)
        {
            GameObject.Destroy(obj);
        }

        buttonCloseMenuCol.enabled = false;

        // Playコントローラーがある場合は削除してからインスタンス生成する
        GameObject obj2 = GameObject.FindWithTag("PlayController");

        if (obj2 != null)
        {
            GameObject.Destroy(obj2);
        }
        playController = (GameObject)Instantiate(playControllerPrefab);
        play           = playController.GetComponent <PlayController>();

        // お題表示
        Invoke("ShowFab", 6.0f);
    }
コード例 #15
0
    public bool Init(GameObject model)
    {
        m_DeviceController = new DeviceCtrl();

        m_PlayController = new PlayController(model);
        return(true);
    }
コード例 #16
0
ファイル: GameController.cs プロジェクト: AlphaFireRH/Begin
 /// <summary>
 /// 结束游戏
 /// </summary>
 public void EndGame(PlayController play)
 {
     if (playCtrl != null && playCtrl == play)
     {
         mapData    = null;
         historyMap = new List <MapData>();
     }
 }
コード例 #17
0
ファイル: MainWindow.xaml.cs プロジェクト: yxh1990/PsyHealth
 private void playListBox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (PlayController.PlayIndex != playListBox.SelectedIndex)
     {
         PlayController.PlayIndex = playListBox.SelectedIndex;
         PlayController.PlayMusic();
     }
 }
コード例 #18
0
 public static void Dispose()
 {
     if (PlayController != null)
     {
         PlayController.Dispose();
         PlayController = null;
     }
 }
コード例 #19
0
ファイル: MonsterController.cs プロジェクト: gkskzh100/Maze
 void OnTriggerEnter(Collider col)
 {
     if (col.gameObject.name == "Player")
     {
         playController = GameObject.Find("Player").GetComponent <PlayController>();
         // playController.Died();
         StateKill();
     }
 }
コード例 #20
0
        private GameObject SpawnCard(Vector3 position, Guid assetId)
        {
            Debug.Log("[CgsNet Manager] SpawnCard");
            GameObject newCard =
                Instantiate(playController.cardModelPrefab, playController.playArea.transform);

            PlayController.SetPlayActions(newCard.GetComponent <CardModel>());
            return(newCard);
        }
コード例 #21
0
        public void Interact(PlayController playController)
        {
            do
            {
                new PlayMenu(playController).execute();
            } while (!playController.IsFinished());

            playController.NextState();
        }
コード例 #22
0
	// Use this for initialization
	void Start () {
		// Playコントローラーがない場合は無条件でメニュー画面に戻る
		GameObject playController = GameObject.FindWithTag ("PlayController");
		if (playController == null) {
			SceneManager.LoadScene ("menu");
			return;
		}
		play = playController.GetComponent<PlayController>();
	}
コード例 #23
0
        const int LOWEST_DIFF  = 1; //lowest diff level

        public PlayControllerTests()
        {
            _controller = new PlayController();
            _image      = new ImageDBRepository();
            _map        = new MapDBRepository();
            _progress   = new ProfileProgressDBRepository();
            _minigame   = new MiniGamesDBRepository();
            _options    = new OptionsDBRepository();
        }
コード例 #24
0
 bool Init(GameObject modelRef, GameObject model, string strFileNameRef)
 {
     m_PlayControllerRef  = new PlayController(modelRef);
     m_RecordController   = model.GetComponent <ModelCtrl>();
     m_DeviceController   = new DeviceCtrl();
     m_TrailCurveAppraise = new TrailCurveAppraiseCtrl();
     m_ReaderRef          = new FileReader(strFileNameRef);
     return(true);
 }
コード例 #25
0
ファイル: GameController.cs プロジェクト: AlphaFireRH/Begin
 /// <summary>
 /// 立即结束游戏
 /// </summary>
 private void ImmediatelyEndGame()
 {
     if (playCtrl != null)
     {
         playCtrl.EndGame();
         playCtrl   = null;
         mapData    = null;
         historyMap = new List <MapData>();
     }
 }
コード例 #26
0
    // Use this for initialization
    void Start()
    {
        AudioSource[] audioSources = GetComponents <AudioSource>();
        BGM1        = audioSources[0];
        BGM1onVoice = audioSources[1];
        BGM2        = audioSources[2];
        BGM2onVoice = audioSources[3];
        BGM3        = audioSources[4];
        BGM3onVoice = audioSources[5];

        // Playコントローラーがない場合は無条件でメニュー画面に戻る
        GameObject playController = GameObject.FindWithTag("PlayController");

        if (playController == null)
        {
            SceneManager.LoadScene("menu");
            return;
        }
        play = playController.GetComponent <PlayController>();

        // リザルト確認
        int resultCnt = 0;

        if (play.fabFlag1)
        {
            resultCnt++;
        }
        if (play.fabFlag2)
        {
            resultCnt++;
        }
        if (play.fabFlag3)
        {
            resultCnt++;
        }
        if (resultCnt >= 2)
        {
            Instantiate(result1);
            BGM1onVoice.Play();
            Invoke("PlayNoVoice1", BGM1onVoice.clip.length);
        }
        if (resultCnt == 1)
        {
            Instantiate(result2);
            BGM2onVoice.Play();
            Invoke("PlayNoVoice2", BGM2onVoice.clip.length);
        }
        if (resultCnt == 0)
        {
            Instantiate(result3);
            BGM3onVoice.Play();
            Invoke("PlayNoVoice3", BGM3onVoice.clip.length);
        }
    }
コード例 #27
0
        public void Interact(PlayController playController)
        {
            do
            {
                ProposedCombinationView proposedCombinationView = new ProposedCombinationView(playController);
                playController.AddProposedCombination(proposedCombinationView.Read());
                new BoardView(playController).Write();
            } while (!playController.IsFinished());

            playController.Next();
        }
コード例 #28
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
コード例 #29
0
    // Use this for initialization
    void Start()
    {
        // Playコントローラーがない場合は無条件でメニュー画面に戻る
        GameObject playController = GameObject.FindWithTag("PlayController");

        if (playController == null)
        {
            SceneManager.LoadScene("menu");
            return;
        }
        play = playController.GetComponent <PlayController>();
    }
コード例 #30
0
ファイル: MonsterController.cs プロジェクト: gkskzh100/Maze
 private void StateKill()
 {
     state = "kill";
     playerAlive.GetComponent <PlayerAlive>().alive         = false;
     playController.GetComponent <PlayController>().enabled = false;
     deathCam.SetActive(true);
     deathCam.transform.position = Camera.main.transform.position;
     deathCam.transform.rotation = Camera.main.transform.rotation;
     Camera.main.gameObject.SetActive(false);
     playController = GameObject.Find("Player").GetComponent <PlayController>();
     playController.Died();
     Invoke("reset", 3f);
 }
コード例 #31
0
        // ReSharper disable once MemberCanBeMadeStatic.Local
        private void CmdSpawnCard(string cardId, Vector3 position, Quaternion rotation, bool isFacedown)
        {
            var playController    = CgsNetManager.Instance.playController;
            var newCardGameObject = Instantiate(playController.cardModelPrefab, playController.playMat.transform);
            var cardModel         = newCardGameObject.GetComponent <CardModel>();

            cardModel.Value      = CardGameManager.Current.Cards[cardId];
            cardModel.position   = position;
            cardModel.rotation   = rotation;
            cardModel.isFacedown = isFacedown;
            PlayController.SetPlayActions(cardModel);
            NetworkServer.Spawn(newCardGameObject);
            cardModel.RpcHideHighlight();
        }
コード例 #32
0
 private void btnPlay_MouseDown(object sender, MouseButtonEventArgs e)
 {
     if (e.ChangedButton == MouseButton.Left)
     {
         if (btnPlay.ToolTip.ToString() != "播放")
         {
             PlayController.Pause();
         }
         else
         {
             PlayController.Play();
         }
     }
 }
コード例 #33
0
        public void PrivateBoardFilling_EqualTrue()
        {
            PlayController playController = new PlayController();

            PrivateObject privateObject = new PrivateObject(playController);

            privateObject.Invoke("BoardClear");

            privateObject.Invoke("BoardFilling", 2);

            IBoard  board       = (IBoard)(privateObject.GetFieldOrProperty("Board"));
            IPlayer whitePlayer = (IPlayer)(privateObject.GetFieldOrProperty("WhitePlayer"));
            IPlayer blackPlayer = (IPlayer)(privateObject.GetFieldOrProperty("BlackPlayer"));

            IPiece[] pieces = (IPiece[])(privateObject.GetFieldOrProperty("Pieces"));

            ICheckersCell checkersCellWhite = A.Fake <ICheckersCell>();

            A.CallTo(() => checkersCellWhite.Player).Returns(whitePlayer);
            A.CallTo(() => checkersCellWhite.Piece).Returns(pieces[0]);

            ICheckersCell checkersCellBlack = A.Fake <ICheckersCell>();

            A.CallTo(() => checkersCellBlack.Player).Returns(blackPlayer);
            A.CallTo(() => checkersCellBlack.Piece).Returns(pieces[0]);

            ICheckersCell[] checkersCell = new ICheckersCell[]
            {
                checkersCellWhite, checkersCellWhite, checkersCellWhite, checkersCellWhite,
                checkersCellWhite, checkersCellWhite, checkersCellWhite, checkersCellWhite,
                null, null, null, null,
                null, null, null, null,
                null, null, null, null,
                null, null, null, null,
                checkersCellBlack, checkersCellBlack, checkersCellBlack, checkersCellBlack,
                checkersCellBlack, checkersCellBlack, checkersCellBlack, checkersCellBlack,
            };
            for (int i = 1; i <= board.Size; i++)
            {
                if (checkersCell[i - 1] == null || board[i] == null)
                {
                    Assert.AreEqual(checkersCell[i - 1], board[i], $"\ni={i} \nnull ");
                }
                else
                {
                    Assert.AreEqual(checkersCell[i - 1].Player.Name, board[i].Player.Name, $"\ni={i} \nPlayer ");
                    Assert.AreEqual(checkersCell[i - 1].Piece.Name, board[i].Piece.Name, $"\ni={i} \nPiece ");
                }
            }
        }
コード例 #34
0
 void Start()
 {
     Screen.sleepTimeout = SleepTimeout.NeverSleep;
     Instance = this;
     if (cam == null)
     {
         cam = Camera.main;
     }
     playController = GetComponent<PlayController>();
     cutsceneController = GetComponent<SpaceCutscene>();
     gameOverController = GetComponent<GameOverController>();
     InitLanguage();
     GoToCutScene();
 }
コード例 #35
0
	// Use this for initialization
	void Start () {
		AudioSource[] audioSources = GetComponents<AudioSource>();
		BGM1 = audioSources[0];
		BGM1onVoice = audioSources[1];
		BGM2 = audioSources[2];
		BGM2onVoice = audioSources[3];
		BGM3 = audioSources[4];
		BGM3onVoice = audioSources[5];

		// Playコントローラーがない場合は無条件でメニュー画面に戻る
		GameObject playController = GameObject.FindWithTag ("PlayController");
		if (playController == null) {
			SceneManager.LoadScene ("menu");
			return;
		}
		play = playController.GetComponent<PlayController>();

		// リザルト確認
		int resultCnt = 0;
		if (play.fabFlag1) {
			resultCnt++;
		}
		if (play.fabFlag2) {
			resultCnt++;
		}
		if (play.fabFlag3) {
			resultCnt++;
		}
		if (resultCnt >= 2) {
			Instantiate (result1);
			BGM1onVoice.Play ();
			Invoke ("PlayNoVoice1", BGM1onVoice.clip.length);
		}
		if (resultCnt == 1) {
			Instantiate (result2);
			BGM2onVoice.Play ();
			Invoke ("PlayNoVoice2", BGM2onVoice.clip.length);
		}
		if (resultCnt == 0) {
			Instantiate (result3);
			BGM3onVoice.Play ();
			Invoke ("PlayNoVoice3", BGM3onVoice.clip.length);
		}
	}
コード例 #36
0
 void Start()
 {
     Screen.sleepTimeout = SleepTimeout.NeverSleep;
     if(cam == null)
     {
         cam = Camera.main;
     }
     playController = GetComponent<PlayController>();
     cutsceneController = GetComponent<CutsceneController>();
     gameOverController = GetComponent<GameOverController>();
     InitLanguage();
     if (SceneManager.GetActiveScene().name == "MelonScene")
     {
         GotoTitleScreen();
     }
     else
     {
         GoToCutScene();
     }
     
 }
コード例 #37
0
	// Use this for initialization
	void Start () {
		AudioSource[] audioSources = GetComponents<AudioSource>();
		BGM = audioSources[0];
		BGMonVoice = audioSources[1];
		voiceFinish = audioSources[2];

		BGMonVoice.Play ();
		Invoke ("PlayNoVoice", BGMonVoice.clip.length);

		buttonYesCol.enabled = false;
		buttonNoCol.enabled = false;

		// Playコントローラーがない場合は無条件でメニュー画面に戻る
		GameObject playController = GameObject.FindWithTag ("PlayController");
		if (playController == null) {
			SceneManager.LoadScene ("menu");
			return;
		}
		play = playController.GetComponent<PlayController>();

		// 表示
		play.InitObj();
		play.Show (-1);
	}
コード例 #38
0
ファイル: Player.cs プロジェクト: Wirdo91/Fort-Cat
 public Player(Fort fort)
 {
     _fort = fort;
     _cardControllerInstance = GameObject.FindObjectOfType<CardController>();
     _playControllerInstance = GameObject.FindObjectOfType<PlayController>();
 }
コード例 #39
0
 void Build()
 {
     playController_ = new PlayController();
     playController_.Build();
     UniqueGameController.Instance.AddGameBehaviour(playController_);
 }