Java tutorial
/* * Copyright 2014 Jesse Corbett * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package us.notsoserio.ninja; import com.badlogic.gdx.Application; import com.badlogic.gdx.ApplicationAdapter; import com.badlogic.gdx.Gdx; public class NinjaGame extends ApplicationAdapter { public static float ZoomFactor = 1280f / 50f;//todo factor out of code GameInstance gameInstance; @Override public void create() { if (Gdx.app.getType() == Application.ApplicationType.HeadlessDesktop) { gameInstance = new ServerInstance(); } else { gameInstance = new ClientInstance(); } } @Override public void render() { gameInstance.GameTick(); } }