| | |
| | | import com.secondworld.sdk.utils.LogUtil; |
| | | import com.unity3d.player.UnityPlayer; |
| | | |
| | | public class GameApp extends Application { |
| | | public abstract class GameApp extends Application { |
| | | |
| | | public static GameApp I; |
| | | |
| | | public String appId = ""; |
| | | |
| | | protected boolean isDemo = false; |
| | | |
| | | @Override |
| | | public void onCreate() { |
| | | super.onCreate(); |
| | | newInstance(); |
| | | initPlatformDiff(); |
| | | LogUtil.Init(this); |
| | | UnityMsgHandler.initCommandMap(); |
| | | registerProxy(); |
| | |
| | | protected void newInstance() { |
| | | I = this; |
| | | } |
| | | |
| | | protected abstract void initPlatformDiff(); |
| | | |
| | | protected void registerProxy() { |
| | | |
| | |
| | | |
| | | //是否位demo |
| | | public boolean isDemo() { |
| | | return I.getPackageName().equals("com.secondworld.demo"); |
| | | return isDemo; |
| | | } |
| | | |
| | | } |