Subversion Repositories AndroidProjects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
836 chris 1
package com.gebauz.burutaru;
2
 
3
import com.gebauz.bauzoid.game.Game;
4
import com.gebauz.bauzoid.gamestates.BaseLoadingScreen;
5
import com.gebauz.bauzoid.math.MathUtil;
6
import com.gebauz.bauzoid.math.Vector4;
7
import com.gebauz.burutaru.GameConsts;
8
 
9
public class LoadingScreen extends BaseLoadingScreen
10
{
11
        // Constants========================================================================================
12
 
13
        // Embedded Types===================================================================================
14
 
15
        // Fields===========================================================================================
16
 
17
        private Vector4 mColor = new Vector4(1, 1, 1, 1);
18
 
19
        // Methods==========================================================================================
20
 
21
        public LoadingScreen(Game game)
22
        {
23
                super(game);
24
        }
25
 
26
        @Override
27
        public void update(float deltaTime)
28
        {
29
                mColor.w = 0.8f + 0.2f * MathUtil.sin(getGame().getTime()*360.0f);
30
        }
31
 
32
        @Override
33
        public void render()
34
        {
35
                getGraphics().clear(0, 0, 0, 0);
36
 
37
                getGraphics().renderStates.projection.setOrtho(
38
                                0.0f,
39
                                GameConsts.VIRTUAL_SCREEN_WIDTH-1,
40
                                GameConsts.VIRTUAL_SCREEN_HEIGHT-1,
41
                                0.0f,
42
                                0.0f,
43
                                1.0f
44
                        );
45
 
46
                getFonts().getDefaultFont().drawText("Loading...", GameConsts.VIRTUAL_SCREEN_WIDTH - 100.0f, GameConsts.VIRTUAL_SCREEN_HEIGHT - 40.0f, mColor);
47
        }
48
 
49
        // Getters/Setters==================================================================================
50
}