// Update is called once per frame void Update() { //デバッグ用 /* * if (Input.GetMouseButtonDown(1)) { * sv.CardAdd(new CardState(Random.Range(1, 10))); * yh.CardAdd(new CardState(Random.Range(7,9))); * } * /* * if (Input.GetKeyDown(KeyCode.UpArrow)) { * oh.CardAddSub(1); * } * * if (Input.GetKeyDown(KeyCode.DownArrow)) { * oh.CardAddSub(-1); * }*/ //オブジェクトを見つけてない if (ms_obj == null) { //あったよオブジェクトが if (GameObject.Find(Network.m_resourcePath + Network.cln) != null) { ms_obj = GameObject.Find(Network.m_resourcePath + Network.cln); ms = ms_obj.GetComponent <MainSystem>(); } else { return; } } if (ms == null) { return; } if (ms.game_script == null) { return; } if (!isEntry) { /* * if (ms_obj.GetComponent<PhotonView>().isMine) { * handle = 0; * } else { handle = 1; } * opponent = handle == 0 ? 1 : 0; */ handle = ms.PlayerEntry(deck); opponent = handle == 0 ? 1 : 0; isEntry = true; } /* * if (ms != null && ms.game_script.read_log != null * && ms.game_script.read_log.Count != 0) { * if (ms.game_script.read_log.Count != log.log.Count || (log.log.Count != 0 && ms.game_script.read_log[0] != log.log[0])) { || log.ReroadLog(ms.game_script.GetLog(-1)); || } ||} */ if (ms.game_script.transition == GameScript.Transition.before) { return; } if (!isReady) { isReady = true; return; } if (Input.GetMouseButtonDown(0)) { clickStart = Input.mousePosition / Screen.height; } { bool flag = false; for (int i = 0; i < ms.game_script.requests.Count; ++i) { if (ms.game_script.requests[i][0] != (int)GameScript.Request.none) { flag = true; break; } } if (flag) { InputAct(); } } if (isAbleToPass != pb.interactable) { pb.interactable = isAbleToPass; } //下の2つのifは並び替えてはいけない if (isFocus) { CardFocus(); } if (Input.GetMouseButtonUp(0) && fc == null) { isFocus = true; } }