float spf = 0.033f;//30fps public void Start() { NativeInterface.Init(); ShaderMgr.Init(); ui_sty.normal.textColor = Color.red; ui_sty.fontSize = 20; }
private void Awake() { if (instance == null) { instance = this; } }
public void Dispose() { GC.SuppressFinalize(this); if (frontBuffer != null) { frontBuffer.Dispose(); frontBuffer = null; } if (FrameBuffer != null) { FrameBuffer.Dispose(); FrameBuffer = null; } if (Rasterizer != null) { Rasterizer.Dispose(); Rasterizer = null; } if (ShaderData != null) { ShaderData.Dispose(); ShaderData = null; } if (ShaderMgr != null) { ShaderMgr.Dispose(); ShaderMgr = null; } Shader = null; UsingSubShader = null; UsingPass = null; }
public override void PostLoad() { base.PostLoad(); if (m_equip == null || m_equip.skin == null || tex == null) { return; } m_equip.mpb.SetTexture(ShaderMgr.GetPartOffset(part), tex); m_equip.skin.SetPropertyBlock(m_equip.mpb); }
private void InitShaders() { m_ShaderMgr = new SharpDXShaderMgr(this); m_DefaultPixelShader = (SharpDXShader)ShaderMgr.LoadPS("Content/Shaders/Default.ps.hlsl"); m_DefaultVertexShader = (SharpDXShader)ShaderMgr.LoadVS("Content/Shaders/Default.vs.hlsl"); PixelShader = m_DefaultPixelShader; VertexShader = m_DefaultVertexShader; }
public static void Init(MonoBehaviour en) { _entrance = en; Application.targetFrameRate = 60; #if Native NativeInterface.Init(); #endif XTimerMgr.singleton.Init(); XConfig.Initial(LogLevel.Log, LogLevel.Error); XGlobalConfig.Initial(); XTableMgr.Initial(); ShaderMgr.Init(); XResources.Init(); UIManager.singleton.Initial(); Documents.singleton.Initial(); RegistCallbackLog(); }
// --- Unity default --- // Use this for initialization void Awake() { if (null == instance) { instance = this; } else if (this != instance) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); InitGame(); //get instance of managers sceneManager = GetComponent <SceneMgr>(); shaderManager = GetComponent <ShaderMgr>(); messageManager = GetComponent <MessageMgr>(); ItemManager = GetComponent <ItemMgr>(); }