// Update is called once per frame void Update() { //左クリックでa_flagをTrueにする if (Input.anyKeyDown && once == true) { a_flag = true; a_color = 1; once = false; FindObjectOfType <CountDownTimer>().CountDown(); } //a_flagがtrueの間実行する if (a_flag) { //テキストの透明度を変更する Qtext.color = new Color(255, 255, 255, a_color); a_color -= Time.deltaTime; //透明度が0になったら終了する。 if (a_color < 0) { a_color = 0; a_flag = false; StageSetting stageSetting = StManager.GetComponent <StageSetting>(); stageSetting.PlayerSpawn(); } } }
// Use this for initialization void Start() { refObj = GameObject.Find("StageManager"); stageSetting = refObj.GetComponent <StageSetting>(); timerText.text = "TimeLimit:" + (seconds / 60).ToString() + (seconds % 60).ToString(); initialTotalTime = totalTime; }
public void CopyPlay() { GameObject.Find("Message").GetComponent <MEmessage>().text = "클립보드로 복사했으며, 즉시 플레이합니다"; GUIUtility.systemCopyBuffer = mapCode; string[] split1 = GUIUtility.systemCopyBuffer.Split(new char[] { ';' }); string[] split2 = split1[0].Split(new char[] { '*' }); GameObject setting = Instantiate(mePlaySetting); StageSetting setting2 = setting.GetComponent <StageSetting>(); setting.name = "StageSetting"; setting2.width = (int.Parse(split2[0])); setting2.height = (int.Parse(split2[1])); for (int i = 0; i < split1[1].Length; i++) { if (split1[1][i] == '0' || split1[1][i] == '3' || split1[1][i] == '6' || split1[1][i] == '9' || split1[1][i] == 'c') { setting2.condition[i] = 0; } else if (split1[1][i] == '1' || split1[1][i] == '4' || split1[1][i] == '7' || split1[1][i] == 'a' || split1[1][i] == 'd') { setting2.condition[i] = 1; } else if (split1[1][i] == '2' || split1[1][i] == '5' || split1[1][i] == '8' || split1[1][i] == 'b' || split1[1][i] == 'e') { setting2.condition[i] = 2; } if (split1[1][i] == '0' || split1[1][i] == '1' || split1[1][i] == '2') { setting2.type[i] = -1; } else if (split1[1][i] == '3' || split1[1][i] == '4' || split1[1][i] == '5') { setting2.type[i] = 0; } else if (split1[1][i] == '6' || split1[1][i] == '7' || split1[1][i] == '8') { setting2.type[i] = 1; } else if (split1[1][i] == '9' || split1[1][i] == 'a' || split1[1][i] == 'b') { setting2.type[i] = 2; } else if (split1[1][i] == 'c' || split1[1][i] == 'd' || split1[1][i] == 'e') { setting2.type[i] = 3; } } StartCoroutine("GameStart"); }
public void SetStageColors(StageSetting stageSetting) { _stageSetting = stageSetting; _skyboxMat.SetFloat(Shader.PropertyToID("_SunIntensity"), SunIntensity); _skyboxMat.SetColor(Shader.PropertyToID("_SkyColor1"), SkyColor); _skyboxMat.SetColor(Shader.PropertyToID("_SkyColor2"), HorizonColor); _fogMat.SetColor(Shader.PropertyToID("_Color"), FogColor); RenderSettings.fogColor = FogColor; _islandMat.color = IslandColor; _groundMat.color = GroundColor; _ringsMat.color = RingsColor; }
void Start() { refObj = GameObject.Find("StageManager"); stageSetting = refObj.GetComponent <StageSetting>(); Pl = GameObject.Find("Player"); cubeSizeHalf = transform.localScale.x / 2f; chainCheckFlag = false; ////////////////////////////////////////////////////////削除予定 //iTween.MoveTo(gameObject, iTween.Hash("y", 5f)); //StartCoroutine(Control()); ///////////////////////////////////////////////////////// }
// Use this for initialization void Start() { refObj = GameObject.Find("StageManager"); stageSetting = refObj.GetComponent <StageSetting>(); iTweenMoving = true; iTween.MoveFrom(this.gameObject, iTween.Hash( "y", 8f, "time", 1f, "oncomplete", "OnCompleteHandler", "oncompletetarget", this.gameObject)); f_posX = posX; f_posY = posY; firstEntry = true; }
void Click() { if (Input.GetMouseButtonUp(0) && canTouch) { if (Input.mousePosition.x >= Input.mousePosition.y / Screen.height * Screen.width) { string[] split1 = GUIUtility.systemCopyBuffer.Split(new char[] { ';' }); string[] split2 = split1[0].Split(new char[] { '*' }); if (GUIUtility.systemCopyBuffer == null) { GameObject.Find("Message").GetComponent <MEmessage>().text = "클립보드가 비어있습니다"; return; } else { if (split1.Length != 2) { GameObject.Find("Message").GetComponent <MEmessage>().text = "잘못된 코드입니다"; return; } if (split2.Length != 2) { GameObject.Find("Message").GetComponent <MEmessage>().text = "잘못된 코드입니다"; return; } if (int.Parse(split2[0]) < 3 || int.Parse(split2[0]) > 15 || int.Parse(split2[1]) < 3 || int.Parse(split2[1]) > 15) { GameObject.Find("Message").GetComponent <MEmessage>().text = "잘못된 코드입니다"; return; } if (int.Parse(split2[0]) * int.Parse(split2[1]) != split1[1].Length) { GameObject.Find("Message").GetComponent <MEmessage>().text = "잘못된 코드입니다"; return; } for (int i = 0; i < split1[1].Length; i++) { if (split1[1][i] != '0' && split1[1][i] != '1' && split1[1][i] != '2' && split1[1][i] != '3' && split1[1][i] != '4' && split1[1][i] != '5' && split1[1][i] != '6' && split1[1][i] != '7' && split1[1][i] != '8' && split1[1][i] != '9' && split1[1][i] != 'a' && split1[1][i] != 'b' && split1[1][i] != 'c' && split1[1][i] != 'd' && split1[1][i] != 'e' ) { GameObject.Find("Message").GetComponent <MEmessage>().text = "잘못된 코드입니다"; return; } } } GameObject setting = Instantiate(mePlaySetting); StageSetting setting2 = setting.GetComponent <StageSetting>(); setting.name = "StageSetting"; setting2.width = (int.Parse(split2[0])); setting2.height = (int.Parse(split2[1])); for (int i = 0; i < split1[1].Length; i++) { if (split1[1][i] == '0' || split1[1][i] == '3' || split1[1][i] == '6' || split1[1][i] == '9' || split1[1][i] == 'c') { setting2.condition[i] = 0; } else if (split1[1][i] == '1' || split1[1][i] == '4' || split1[1][i] == '7' || split1[1][i] == 'a' || split1[1][i] == 'd') { setting2.condition[i] = 1; } else if (split1[1][i] == '2' || split1[1][i] == '5' || split1[1][i] == '8' || split1[1][i] == 'b' || split1[1][i] == 'e') { setting2.condition[i] = 2; } if (split1[1][i] == '0' || split1[1][i] == '1' || split1[1][i] == '2') { setting2.type[i] = -1; } else if (split1[1][i] == '3' || split1[1][i] == '4' || split1[1][i] == '5') { setting2.type[i] = 0; } else if (split1[1][i] == '6' || split1[1][i] == '7' || split1[1][i] == '8') { setting2.type[i] = 1; } else if (split1[1][i] == '9' || split1[1][i] == 'a' || split1[1][i] == 'b') { setting2.type[i] = 2; } else if (split1[1][i] == 'c' || split1[1][i] == 'd' || split1[1][i] == 'e') { setting2.type[i] = 3; } } StartCoroutine("BlackOn3"); canTouch = false; } else { StartCoroutine("BlackOn"); canTouch = false; } } }
private void Awake() { Instance = this; }
IEnumerator BlackOn() { if (GameObject.Find("MePlayManager") != null) { string[] split1 = GUIUtility.systemCopyBuffer.Split(new char[] { ';' }); string[] split2 = split1[0].Split(new char[] { '*' }); GameObject setting = Instantiate(mePlaySetting); StageSetting setting2 = setting.GetComponent <StageSetting>(); setting.name = "StageSetting"; setting2.width = (int.Parse(split2[0])); setting2.height = (int.Parse(split2[1])); for (int i = 0; i < split1[1].Length; i++) { if (split1[1][i] == '0' || split1[1][i] == '3' || split1[1][i] == '6' || split1[1][i] == '9' || split1[1][i] == 'c') { setting2.condition[i] = 0; } else if (split1[1][i] == '1' || split1[1][i] == '4' || split1[1][i] == '7' || split1[1][i] == 'a' || split1[1][i] == 'd') { setting2.condition[i] = 1; } else if (split1[1][i] == '2' || split1[1][i] == '5' || split1[1][i] == '8' || split1[1][i] == 'b' || split1[1][i] == 'e') { setting2.condition[i] = 2; } if (split1[1][i] == '0' || split1[1][i] == '1' || split1[1][i] == '2') { setting2.type[i] = -1; } else if (split1[1][i] == '3' || split1[1][i] == '4' || split1[1][i] == '5') { setting2.type[i] = 0; } else if (split1[1][i] == '6' || split1[1][i] == '7' || split1[1][i] == '8') { setting2.type[i] = 1; } else if (split1[1][i] == '9' || split1[1][i] == 'a' || split1[1][i] == 'b') { setting2.type[i] = 2; } else if (split1[1][i] == 'c' || split1[1][i] == 'd' || split1[1][i] == 'e') { setting2.type[i] = 3; } } } GameObject.Find("StageClear").GetComponent <StageClear>().clearing = 3; GameObject.Find("BlackPanel").GetComponent <RectTransform>().localScale = new Vector2(1, 1); for (float i = 0; i <= 110; i += 6) { yield return(new WaitForSeconds(0.007f)); black.color = new Color(0, 0, 0, i / 100); } SceneManager.LoadScene(stage, LoadSceneMode.Single); }
// a method to get a reference to the stage setting public void SetStageSetting(StageSetting stageSetting) { this.stageSetting = stageSetting; }