Update SurvivalIsland

This commit is contained in:
xixu-me committed 2025-04-10 19:05:55 +08:00
1 parent cbf94c4b2e
commit 24ccea0748
136 files changed
+928 -385

No files matched your search

@@ -0,0 +1,49 @@
using UnityEngine;
using System.Collections;
[RequireComponent (typeof (AudioSource))]
public class MainMenuBtns : MonoBehaviour {
public string levelToLoad;
public Texture2D normalTexture;
public Texture2D rollOverTexture;
public AudioClip beep;
public bool quitButton = false;
public bool instructionsButton = false;
public GUIText textHints;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnMouseEnter() {
guiTexture.texture = rollOverTexture;
}
void OnMouseExit() {
guiTexture.texture = normalTexture;
}
IEnumerator OnMouseUp() {
audio.PlayOneShot (beep);
yield return new WaitForSeconds(0.35f);
if (quitButton) {
Application.Quit ();
} else if (instructionsButton) {
textHints.SendMessage("ShowHint",
"You awake on a mysterious island..." +
"Find a way to signal for help or face certain doom!");
}
else {
Application.LoadLevel (levelToLoad);
}
}
}