Exemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            //Load a Texture (Assets/Resources/Textures/texture01.png)
            var mainTexture = Resources.Load <Texture2D>("ManagerLogo");

            GUILayout.BeginHorizontal();
            if (GUILayout.Button(mainTexture))
            {
                Application.OpenURL("https://assetstore.unity.com/?q=Polyperfect&orderBy=0");
            }
            GUILayout.EndHorizontal();

            WanderManager Manager = (WanderManager)target;

            if (!Application.isPlaying)
            {
                base.OnInspectorGUI();
                return;
            }

            GUILayout.Space(10);

            Manager.PeaceTime = EditorGUILayout.Toggle("Peace Time", Manager.PeaceTime);

            GUILayout.Space(5);

            if (GUILayout.Button("Kill 'Em All"))
            {
                Manager.Nuke();
            }
        }
Exemplo n.º 2
0
        public override void OnInspectorGUI()
        {
            //Load a Texture (Assets/Resources/Textures/texture01.png)
            var mainTexture = Resources.Load <Texture2D>("ManagerLogo");

            GUILayout.BeginHorizontal();
            GUILayout.Label(mainTexture);
            GUILayout.EndHorizontal();

            WanderManager animalManager = (WanderManager)target;

            if (!Application.isPlaying)
            {
                base.OnInspectorGUI();
                return;
            }

            GUILayout.Space(10);

            animalManager.PeaceTime = EditorGUILayout.Toggle("Peace Time", animalManager.PeaceTime);

            GUILayout.Space(5);

            if (GUILayout.Button("Kill 'Em All"))
            {
                animalManager.Nuke();
            }
        }
Exemplo n.º 3
0
        private void Awake()
        {
            if (instance != null && instance != this)
            {
                Destroy(gameObject);
                return;
            }

            instance = this;
        }
Exemplo n.º 4
0
        private void Awake()
        {
            if (instance != null && instance != this)
            {
                Destroy(gameObject);
                Debug.LogError("Two Wander Managers were found in the scene, Make sure there is only ever one!");
                return;
            }

            instance = this;
        }