當前位置: 首頁>>代碼示例>>Java>>正文


Java MockGraphics類代碼示例

本文整理匯總了Java中com.badlogic.gdx.backends.headless.mock.graphics.MockGraphics的典型用法代碼示例。如果您正苦於以下問題:Java MockGraphics類的具體用法?Java MockGraphics怎麽用?Java MockGraphics使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


MockGraphics類屬於com.badlogic.gdx.backends.headless.mock.graphics包,在下文中一共展示了MockGraphics類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: main

import com.badlogic.gdx.backends.headless.mock.graphics.MockGraphics; //導入依賴的package包/類
public static void main(String[] args)
  {
SpringApplication.run(HeadlessServerLauncher.class, args);
  	
  	ServerSettings.isHeadless = true;
  	LwjglNativesLoader.load();
Gdx.files = new LwjglFiles();
HeadlessNativesLoader.load();
MockGraphics mockGraphics = new MockGraphics();
Gdx.graphics = mockGraphics;
HeadlessNet headlessNet = new HeadlessNet();
Gdx.net = headlessNet;
Gdx.gl = new NullGL20();
Gdx.gl20 = new NullGL20();
Gdx.gl30 = new NullGL30();
HeadlessApplicationConfiguration config = new HeadlessApplicationConfiguration();
new HeadlessApplication(new GameServer(), config);
  }
 
開發者ID:MMORPG-Prototype,項目名稱:MMORPG_Prototype,代碼行數:19,代碼來源:HeadlessServerLauncher.java

示例2: init

import com.badlogic.gdx.backends.headless.mock.graphics.MockGraphics; //導入依賴的package包/類
/**
 * Initializes a headless GDX platform for testing.
 */
public static synchronized void init() {
    if (Gdx.gl instanceof MockGL) {
        // Already initialized
        return;
    }

    HeadlessNativesLoader.load();
    Gdx.app = new GdxAppStub();
    Gdx.files = new HeadlessFiles();
    Gdx.net = new HeadlessNet();
    Gdx.graphics = new MockGraphics();
    Gdx.gl20 = MockGL.newInstance();
    Gdx.gl = Gdx.gl20;
    Gdx.audio = new MockAudio();
    Gdx.input = new MockInput();
}
 
開發者ID:anonl,項目名稱:nvlist,代碼行數:20,代碼來源:HeadlessGdx.java

示例3: HeadlessApplication

import com.badlogic.gdx.backends.headless.mock.graphics.MockGraphics; //導入依賴的package包/類
public HeadlessApplication(ApplicationListener listener, HeadlessApplicationConfiguration config) {
	if (config == null)
		config = new HeadlessApplicationConfiguration();
	
	HeadlessNativesLoader.load();
	this.listener = listener;
	this.files = new HeadlessFiles();
	this.net = new HeadlessNet();
	// the following elements are not applicable for headless applications
	// they are only implemented as mock objects
	this.graphics = new MockGraphics();
	this.audio = new MockAudio();
	this.input = new MockInput();

	Gdx.app = this;
	Gdx.files = files;
	Gdx.net = net;
	Gdx.audio = audio;
	Gdx.graphics = graphics;
	Gdx.input = input;
	
	renderInterval = config.renderInterval > 0 ? (long)(config.renderInterval * 1000000000f) : (config.renderInterval < 0 ? -1 : 0);
	
	initialize();
}
 
開發者ID:basherone,項目名稱:libgdxcn,代碼行數:26,代碼來源:HeadlessApplication.java


注:本文中的com.badlogic.gdx.backends.headless.mock.graphics.MockGraphics類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。