// Use this for initialization void Start() { moveOnMouse = MoveOnMouse.FindObjectOfType <MoveOnMouse> (); mainCamera = GameObject.FindGameObjectWithTag("MainCamera"); aSync = ASyncLoadScript.FindObjectOfType <ASyncLoadScript> (); //levelManager = LevelManager.FindObjectOfType<LevelManager>(); //GameObject playerShip = GetComponent<BoxCollider>(); }
// Update is called once per frame void Update() { PlayerPrefs.SetFloat("PLAYER_POSITION_NOW_X", this.gameObject.transform.position.x); PlayerPrefs.SetFloat("PLAYER_POSITION_NOW_Z", this.gameObject.transform.position.z); if (moveOnMouse == null) { moveOnMouse = MoveOnMouse.FindObjectOfType <MoveOnMouse> (); } }