/** * Use this for initialization */ void Start() { // StartCoroutine(TargetCreate()); // スタートメッセージ非表示 StartMessage.gameObject.SetActive(false); // ゲームハンドラー gameDirector = GameDirector.GetSheredInstance(); // イベントハンドラー設定 gameDirector.AddListenerScreenPositon(OnScreenPosition); gameDirector.AddListenerScreenShot(OnScreenShot); var players = gameDirector.GetActivePlayer(); foreach (var player in players) { int score = player.Score; int index = (int)player.Color; Scores[index].text = String.Format("{0}", score); } StartCoroutine(PlayBGM()); StartCoroutine(ShowStartMessage()); // SteamVR.instance.hmd.ResetSeatedZeroPose(); StartCoroutine(WaitCountUp()); }
void Start() { gameDirector = GameDirector.GetSheredInstance(); var tes = gameDirector.GetActivePlayer(); // イベントハンドラー設定 gameDirector.AddListenerScreenPositon(OnScreenPosition); gameDirector.AddListenerScreenShot(OnScreenShot); // ボス対象位置設定 foreach (Player.ColorType color in Enum.GetValues(typeof(Player.ColorType))) { var index = (int)color; int targetX = Random.Range(maskPadding, Screen.width - maskPadding); int targetY = Random.Range(maskPadding, Screen.height - maskPadding); var targetPoint = new Vector2(targetX, targetY); targets[index] = targetPoint; if (TargetPrefab != null) { // ターゲット自動生成(不動) //TargetObject[index] = Instantiate(TargetPrefab, Camera.main.ScreenToWorldPoint(targetPoint), Quaternion.identity); //TargetObject[index].transform.LookAt(Camera.main.transform.position); //var distanse = TargetObject[index].transform.position - Camera.main.transform.position; //TargetObject[index].transform.Translate(Camera.main.transform.forward * 10); } // Player player = gameDirector.GetPlayer(color); if (player.IsEntry) { isTargetsFind[index] = false; if (TargetObject[index] != null) { TargetObject[index].SetActive(true); TargetObject[index].transform.LookAt(Camera.main.transform.position); } } } // スタートメッセージ StartCoroutine(StartBGM()); StartCoroutine(ShowStartMessage()); }
void Start() { Timer.gameObject.SetActive(false); gameDirector = GameDirector.GetSheredInstance(); gameDirector.GameReset(); if (SteamVR.instance != null && SteamVR.instance.hmd != null) { SteamVR.instance.hmd.ResetSeatedZeroPose(); } // イベントハンドラー設定 gameDirector.AddListenerScreenPositon(OnScreenPosition); gameDirector.AddListenerScreenShot(OnScreenShot); StartCoroutine(StartBGM()); Player pinkPlayer = gameDirector.GetPlayer(Player.ColorType.Pink); Player greenPlayer = gameDirector.GetPlayer(Player.ColorType.Green); Player purplePlayer = gameDirector.GetPlayer(Player.ColorType.Purple); }