示例#1
0
        // Render the Crosshair
        public static void Render()
        {
            // If the crosshair is faulty, then don't execute this code
            // This is here to stop the Logger from spamming the console.
            if (m_validState)
            {
                if (InvalidCrosshair())
                {
                    Logging.LogWarning("Crosshair was either not initialized, or has an invalid size of (0, 0). Check your settings file and adjust your settings accordingly");
                    return;
                }

                // Don't draw a hidden crosshair. Duh.
                if (m_enabled)
                {
                    GUI.Label(new Rect(Screen.width / 2 - m_texture.width / 2, Screen.height / 2 - m_texture.height / 2, m_texture.width, m_texture.height),
                              m_texture, m_style);
                }
            }
        }
示例#2
0
            public static void LogWarning(string message)
            {
#if DEBUG
                Logging.LogWarning(message);
#endif // DEBUG
            }