Beispiel #1
0
    void Start()
    {
        thePlayer = FindObjectOfType <Moveman>();
        if (thePlayer.startpoint == pointname)
        {
            thePlayer.transform.position = transform.position;

            theCamera = FindObjectOfType <Cameraattach>();
            theCamera.transform.position = new Vector3(transform.position.x, transform.position.y, theCamera.transform.position.z);
        }
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        Scene scene = SceneManager.GetActiveScene();

        if (instanceRef == null)
        {
            instanceRef = this;
            DontDestroyOnLoad(gameObject);
        }
        else
        {
            DestroyImmediate(gameObject);
        }
    }
Beispiel #3
0
 void Start()
 {
     thePlayer = FindObjectOfType <Moveman>();
 }