com.bossletsplays.rr.Ragdoll.java Source code

Java tutorial

Introduction

Here is the source code for com.bossletsplays.rr.Ragdoll.java

Source

/*   Copyright 2014 Matthew Rogers "BossLetsPlays"
*
*   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 com.bossletsplays.rr;

import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.bossletsplays.rr.screens.SplashScreen;
import com.bossletsplays.rr.utils.LogHelper;

/**
 * <strong>Project:</strong> Ragdoll Rick-core <br>
 * 
 * <strong>Class:</strong> Ragdoll
 * 
 * @author <a href = "http://www.youtube.com/BossLetsPlays"> BossLetsPlays</a>
 */
public class Ragdoll extends Game {

    @Override
    public void create() {
        LogHelper.initLog();
        LogHelper.info("Ragdoll created");
        setScreen(new SplashScreen());
    }

    @Override
    public void render() {
        super.render();
    }

    @Override
    public void dispose() {
        super.dispose();
        LogHelper.warn("Ragdoll disposed");
    }

    @Override
    public void pause() {
        super.pause();
    }

    @Override
    public void resume() {
        super.resume();
    }

    public static void exit() {
        LogHelper.warn("Exiting game");
        Gdx.app.exit();
    }

    public static Game getInstance() {
        return (Game) Gdx.app.getApplicationListener();
    }
}