示例#1
0
    // Use this for initialization
    void Start()
    {
        thePlayer = FindObjectOfType <PlayerController> ();

        if (thePlayer.startPoint == pointName)
        {
            thePlayer.transform.position = transform.position;
            thePlayer.lastMove           = startDirection;

            theCamera = FindObjectOfType <CameraController> ();
            theCamera.transform.position = new Vector3(transform.position.x, transform.position.y, theCamera.transform.position.z);
        }
        mobile = FindObjectOfType <MobileDontDestroyOnLoad> ();
        mobile.EnableControlRig(false);
        mobile.EnableControlRig(true);
    }
示例#2
0
 void Start()
 {
     pc     = FindObjectOfType <PlayerController> ();
     theMC  = FindObjectOfType <MusicController> ();
     mobile = FindObjectOfType <MobileDontDestroyOnLoad> ();
 }