using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameDebug : MonoBehaviour { GameManager gmanager; TimeScript timeScript; // Use this for initialization void Start () { // gmanager = GetComponent(); timeScript = GetComponent(); } // Update is called once per frame void Update () { //Bを押すと、プレイヤーにボールを持たせることができる if(Input.GetKey(KeyCode.B) && (gmanager.ballChara == null || gmanager.ballChara.GetComponent().teamNum != gmanager.P1TeamNum)) { gmanager.ballChara.GetComponent().have_ball = false; gmanager.playerChara.GetComponent().BallGet(); } //Tを押すと、タイマーが残り3秒になる if(Input.GetKey(KeyCode.T)&& timeScript.getNowTime() > 0f) { timeScript.setTimeDebug(3f); } } }