// Use this for initialization void Start() { Debug.Log(main); main = true; Application.targetFrameRate = 60; PenghargaanContainer.load(); PenghargaanController.load(); AudioController.Load(); acc = AccountContainer.load().accounts; if (!AudioController.getInstance().containKey("MainMenu")) { AudioSource audio = AudioController.getInstance().registerSound("Audio/Intro insyaAllah fix", "MainMenu"); DontDestroyOnLoad(audio); audio.loop = true; audio.Play(); } else { AudioSource audio = AudioController.getInstance().getAudioSource("MainMenu"); audio.UnPause(); } restartOption(); SaveGameUI.SetActive(false); Scene.moveOut(); }
public static PenghargaanController load() { if (self == null) { self = new PenghargaanController(); self.AC = AccountContainer.load(); self.PC = PenghargaanContainer.load(); return(self); } else { return(self); } }
// Use this for initialization void Start() { Application.targetFrameRate = 60; PenghargaanContainer.load(); PenghargaanController.load(); AudioController.Load(); acc = AccountContainer.load().accounts; AudioSource audio = AudioController.getInstance().registerSound("Audio/Intro insyaAllah fix", "MainMenu"); audio.loop = true; audio.Play(); restartOption(); saveClose(); }
protected override void instantiate <T>() { base.instantiate <KarapanGameControl>(); base.name = Name; userInputControl = gameObject.GetComponent <UserInputControl>(); playerControl = GameObject.Find("Player").GetComponent <KarapanPlayerControl>(); lifeControl = gameObject.GetComponent <KarapanLifeControl>(); speedControl = gameObject.GetComponent <KarapanSpeedControl>(); progressControl = gameObject.GetComponent <ProgressControl>(); playerControl = GameObject.Find("Player").GetComponent <KarapanPlayerControl>(); addSubController("LifeControl", lifeControl); addSubController("SpeedControl", speedControl); addSubController("PlayerControl", playerControl); addSubController("ProgressControl", progressControl); addSubController("UserInputControl", userInputControl); UnityEngine.Debug.Log(userInputControl); userInputControl.addKeyMap(new KeyMap(new KeyCode[] { KeyCode.Space }, "TogglePause", delegate() { togglePause(); }, Input.GetKeyDown, 0.75F)); userInputControl.addKeyMap(new KeyMap(new KeyCode[] { KeyCode.Slash }, "DEBUG", delegate() { toggleDebug(); }, Input.GetKeyDown, UserInputControl.SeldomtimePress)); userInputControl.addKeyMap(new KeyMap(new KeyCode[] { KeyCode.Equals }, "reset", delegate() { gameOver(); resetGame(); }, Input.GetKeyDown, UserInputControl.SometimePress)); AccountContainer.load(); }