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

        //get the names of start points and check if they match to coordinate start points
        //in different scenes

        if (thePlayer.startPoint == pointName)
        {
            thePlayer.transform.position = transform.position;
            //add to specify player position when transitioning between locations
            thePlayer.lastMove = startDirection;

            theCamera = FindObjectOfType <CameraController> ();
            theCamera.transform.position = new Vector3(transform.position.x, transform.position.y, theCamera.transform.position.z);
        }
    }
示例#2
0
 // Use this for initialization
 void Start()
 {
     thePlayer = FindObjectOfType <GastlyController> ();
 }