void Start() { kinectPointController = GameObject.Find("KinectPointMan").GetComponent <KinectPointController>(); kinecAction = GameObject.Find("B20_Ch_01_Avatar").GetComponent <KinecAction>(); canHit = GameObject.Find("PlayerTennisBat").GetComponent <TennisBat>(); infoMessage = GameObject.Find("InfoMessage").GetComponent <Text>(); animator = GameObject.Find("B20_Ch_01_Avatar").GetComponent <Animator>(); transform = gameObject.GetComponent <Transform>(); rigidbody = gameObject.GetComponent <Rigidbody>(); drog = this.GetComponent <Rigidbody>().drag; startPosition = new Vector3(-0.84f, 1.15f, 9.62f); transform.position = startPosition; game = GameObject.Find("MainCamera").GetComponent <Game>(); start = GameObject.Find("GameStart"); news = GameObject.Find("GameNew"); }
void Start() { animator = GameObject.Find("Robot").GetComponent <Animator>(); playerHit = GameObject.Find("PlayerTennisBats").GetComponent <TennisBat>(); game = GameObject.Find("MainCamera").GetComponent <Game>(); kinectPointController = GameObject.Find("KinectPointMan").GetComponent <KinectPointController>(); kinecAction = GameObject.Find("Robot").GetComponent <KinecT>(); rigidbody = gameObject.GetComponent <Rigidbody>(); transform = this.GetComponent <Transform>(); drog = this.GetComponent <Rigidbody>().drag; robotGame = GameObject.Find("RobotGame").GetComponent <Text>(); robotSet = GameObject.Find("RobotSet").GetComponent <Text>(); playerGame = GameObject.Find("PlayerGame").GetComponent <Text>(); playerSet = GameObject.Find("PlayerSet").GetComponent <Text>(); startPosition = new Vector3(-0.37f, 0.56f, 9.96f); playerServePos = new Vector3(0.54f, 0.92f, -7.88f); this.transform.position = startPosition; }