//----- void Start() { Application.runInBackground = true; //-- adding the necessary instances CameraObject = (GameObject)Instantiate(Resources.Load("CameraController"), transform); surfaceObject = (GameObject)Instantiate(Resources.Load("Field"), transform); surfaceObject.AddComponent <surfaceScript>(); player1Object = (GameObject)Instantiate(Resources.Load("Piece"), transform); player1Object.AddComponent <player1Script>(); // player2Object = (GameObject)Instantiate (Resources.Load("Piece"),transform); // player2Object.AddComponent<player2Script>(); player3Object = (GameObject)Instantiate(Resources.Load("Piece"), transform); player3Object.AddComponent <player3Script>(); // player4Object = (GameObject)Instantiate (Resources.Load("Piece"),transform); // player4Object.AddComponent<player4Script>(); ballObject = (GameObject)Instantiate(Resources.Load("Ball"), transform); ballObject.AddComponent <ballScript>(); //adding the necessary channel information scripts Camera = CameraObject.GetComponent <sateliteCameraScript>(); Camera.observedObject = surfaceObject; Camera.off = new Vector3(0.0f, 65.0f, 0.0f); Camera.transform.Rotate(60, 0, 0); // gameObject.AddComponent<ChannelControllerRef>(); gameObject.AddComponent <ChannelControllerc1>(); // gameObject.AddComponent<ChannelControllerc2>(); gameObject.AddComponent <ChannelControllerc3>(); // gameObject.AddComponent<ChannelControllerc4>(); }
//----- void Start() { Application.runInBackground = true; //-- adding the necessary instances CameraObject = (GameObject)Instantiate(Resources.Load("CameraController"), transform); //adding the necessary channel information scripts Camera = CameraObject.GetComponent <sateliteCameraScript>(); Camera.off = new Vector3(10.0f, 16.0f, 0.0f); }