Q43.webp
T

Q43.webp

Kizspy | Question: 43
(Choose 1 answer)
What does this script do?
using UnityEngine;
public class GameController: MonoBehaviour {
public static GameController Instance { get; private set; }
public delegate void OnPause();
public event OnPause PauseEvent;
void Awake() {
if (Instance == null) {
Instance = this;
DontDestroyOnLoad(gameObject);
} else {
}
Destroy(gameObject);
void Update() {
if (Input.GetKeyDown(KeyCode.P)) {
PauseEvent?.Invoke();
A. Moves the GameObject on pause
B. Triggers a pause event when the P key is pressed
C. Changes the GameObject's material
D. Logs the pause state

Thông tin

Category
FGU301
Thêm bởi
thuyhoa276
Ngày thêm
Lượt xem
173
Lượt bình luận
1
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom