private void Start() { if (instance) { Destroy(gameObject); } else { instance = this; DontDestroyOnLoad(gameObject); } }
//Do this when the mouse is clicked over the selectable object this script is attached to. public void OnPointerDown(PointerEventData eventData) { CursorLockControl.LockCursor(); GameCanvasScript.Continuar(); }
// Start is called before the first frame update void Awake() { instance = this; restOfUIObjects.SetActive(false); StartCoroutine(GameIntro()); }
public void LoadGameCanvas() // wird in GameCanvasScript.Awake aufgerufen { this.gameCanvas = GameObject.Find("GameCanvas"); gameCanvasScript = gameCanvas.GetComponent <GameCanvasScript>(); gameCanvasInitialised = true; }