// Start is called before the first frame update
 void Start()
 {
     playerRb = GetComponent <Rigidbody>();                                //Connects the player Rigidbody to playerRb
     camra    = GameObject.Find("Main Camera");                            //Connects the main camra to camra
     camra.transform.Translate(transform.position + camraOffset);          //Sets starting position of the camra
     this.GetComponent <MeshRenderer>().enabled = false;                   //Makes player invisible
     toScene         = GameObject.Find("Portal").GetComponent <ToScene>(); //Connects to the To scene script
     sound           = camra.GetComponent <SoundManager>();                //Connects the sound manager to this script
     isTouchingWater = false;
     jumpVelocity    = 5.0f;
 }
示例#2
0
 private void Start()
 {
     toScene = GetComponent <ToScene>();
 }
示例#3
0
 // Start is called before the first frame update
 void Start()
 {
     toScene  = GameObject.Find("Teleporter").GetComponent <ToScene>();        //Connects scripts
     gameOver = GameObject.Find("Enchantment").GetComponent <RotateCircles>(); //Connects scripts
 }