void Awake() { canResetBall = true; if (goalTextUI) { goalTextUI.SetActive(false); } ballRb = ball.GetComponent<Rigidbody>(); m_BallController = ball.GetComponent<SoccerBallController>(); m_BallController.area = this; ballStartingPos = ball.transform.position; }
void Awake() { canResetBall = true; if (goalTextUI) { goalTextUI.SetActive(false); } ballRb = ball.GetComponent <Rigidbody>(); m_BallController = ball.GetComponent <SoccerBallController>(); m_BallController.area = this; ballStartingPos = ball.transform.position; m_ResetParams = Academy.Instance.EnvironmentParameters; }
void Awake() { m_Academy = FindObjectOfType <SoccerAcademy>(); m_GroundRenderer = centerPitch.GetComponent <Renderer>(); m_GroundMaterial = m_GroundRenderer.material; canResetBall = true; if (goalTextUI) { goalTextUI.SetActive(false); } ballRb = ball.GetComponent <Rigidbody>(); m_BallController = ball.GetComponent <SoccerBallController>(); m_BallController.area = this; ballStartingPos = ball.transform.position; }
void Awake() // 무조건 실행되는 함수인데 { m_Academy = FindObjectOfType <SoccerAcademy>(); m_GroundRenderer = centerPitch.GetComponent <Renderer>(); //중앙피치에서 랜더링 값을 가져와서 m_GroundRenderer에 넣어줌. 왜? 아 바닥의 색을 바꾸기 위해서??? m_GroundMaterial = m_GroundRenderer.material; canResetBall = true; // ???? if (goalTextUI) { goalTextUI.SetActive(false); } // ui가 처음에는 안나오고. 골을 넣으면 나옴 ballRb = ball.GetComponent <Rigidbody>(); // 공의 강체값을 ballRb에 넣는다. m_BallController = ball.GetComponent <SoccerBallController>(); m_BallController.area = this; // ballStartingPos = ball.transform.position; // 공의 위치를 시작위치로 정해줌 }