A singleton game object which displays a simple UI for the save system.
상속: UnityEngine.MonoBehaviour
예제 #1
0
        protected virtual void Awake()
        {
            // Only one instance of SaveMenu may exist
            if (instance != null)
            {
                Destroy(gameObject);
                return;
            }

            instance = this;

            GameObject.DontDestroyOnLoad(this);

            clickAudioSource = GetComponent <AudioSource>();
        }
예제 #2
0
파일: SaveMenu.cs 프로젝트: snozbot/fungus
        protected virtual void Awake()
        {
            // Only one instance of SaveMenu may exist
            if (instance != null)
            {
                Destroy(gameObject);
                return;
            }

            instance = this;

            GameObject.DontDestroyOnLoad(this);

            clickAudioSource = GetComponent<AudioSource>();
        }
예제 #3
0
        protected virtual void Awake()
        {
            // Only one instance of SaveMenu may exist
            if (instance != null)
            {
                Destroy(gameObject);
                return;
            }

            instance = this;

            if (transform.parent == null)
            {
                GameObject.DontDestroyOnLoad(this);
            }
            else
            {
                Debug.LogError("Save Menu cannot be preserved across scene loads if it is a child of another GameObject.");
            }

            clickAudioSource = GetComponent <AudioSource>();
        }
예제 #4
0
    //public string key;

    // Use this for initialization
    void Start()
    {
        //save = GameObject.Find("/DontDestroyOnLoad/SaveMenu");
        saveMenu = gameObject.GetComponent <SaveMenu>();
    }