示例#1
0
 private void Start()
 {
     m_Rigidbody = GetComponent <Rigidbody> ();
     GetComponent <Rigidbody> ().maxAngularVelocity = m_MaxAngularVelocity;
     balls = new List <GameObject> ();
     foreach (Transform t in transform)
     {
         balls.Add(t.gameObject);
     }
     spColl           = GetComponent <SphereCollider> ();
     boxColl          = GetComponent <BoxCollider> ();
     controls         = GetComponent <BallUserControl>();
     coinsUIText      = coinsUI.GetComponent <Text>();
     coinsUIText.text = "Coins: " + points + " / " + ProcGen.totalCoins;
 }
示例#2
0
    /*void switchToPlayer(inputToEnable, inputToDisable, cameraLocation)
    {
        inputToEnable.enabled = true;
        inputToDisable.enabled = false;

        defaultCamera.transform.position = cameraLocation.transform.position;
        defaultCamera.transform.rotation = cameraLocation.transform.rotation;}*/
    // Use this for initialization
    void Start()
    {
        ragsUserControl = GameManager.god.ragsObject.GetComponent<ThirdPersonUserControl>();
           ragsAIControl = GameManager.god.ragsObject.GetComponent<AICharacterControl>();

           reasonUserControl = GameManager.god.reasonObject.GetComponent<BallUserControl>();
           reasonToRags = GameManager.god.reasonObject.GetComponent<FollowRags>();

           ragsPlayerCam = GameManager.god.ragsCam;
           reasonPlayerCam = GameManager.god.reasonCam;

           //ragsUserControl.enabled = playerRagsActive;
           //reasonUserControl.enabled = playerReasonActive;

           //ragsPlayerCam.enabled = playerRagsActive;
           //reasonPlayerCam.enabled = playerReasonActive;

        //player1Input = player1.GetComponent("(your controller)");
        //player2Input = player2.GetComponent("(your controller)");
    }
 private void SetUpPlayerScripts()
 {
     ballUserControlScript = player.GetComponent <BallUserControl>();
     ballScript            = player.GetComponent <Ball>();
 }
 // Use this for initialization
 void Start()
 {
     ballControl   = spere.gameObject.GetComponent <BallUserControl>();
     startRotation = this.transform.rotation;
 }