public override void Initialize()
        {
            SetMainLight(fk_Material.TrueWhite, new fk_Vector(0, 0, -1));
            SetStateLight(fk_Material.TrueWhite, new fk_Vector(0, 0, -1));
            SetMainCamera(new fk_Vector(0, 0, 100));
            SetStateCamera(new fk_Vector(0, 0, 100));

            _titleTex = new fk_RectTexture();
            if (!_titleTex.ReadJPG("sram.jpg"))
            {
                Console.WriteLine("Tex Load Error");
            }
            _titleTex.TextureSize = new fk_TexCoord(40, 30);

            _titleTexModel = new fk_Model()
            {
                Shape    = _titleTex,
                Material = fk_Material.White
            };
            _titleTexModel.GlMoveTo(new fk_Vector(0, 10, 0));
            MainScene.EntryModel(_titleTexModel);

            _guideSprite = new fk_SpriteModel();
            if (!_guideSprite.InitFont("PixelMplus12-Regular.ttf"))
            {
                Console.WriteLine("Font Load Error.");
            }

            _guideSprite.PrdScale(0.2);
            _guideSprite.DrawText("Enter : Start");
            _guideSprite.GlMoveTo(new fk_Vector(0, -20, 0));

            MainScene.EntryModel(_guideSprite);
            base.Initialize();
        }
Exemple #2
0
        public void InitSprites()
        {
            _titleLabelSprite = new fk_SpriteModel();
            _scoreLabelSprite = new fk_SpriteModel();
            _scoreSprite      = new fk_SpriteModel();
            _lifeLabelSprite  = new fk_SpriteModel();
            _lifeSprite       = new fk_SpriteModel();

            if (!_titleLabelSprite.InitFont("PixelMplus12-Regular.ttf"))
            {
                Console.WriteLine("Font Load Error.");
            }
            if (!_scoreLabelSprite.InitFont("PixelMplus12-Regular.ttf"))
            {
                Console.WriteLine("Font Load Error.");
            }
            if (!_scoreSprite.InitFont("PixelMplus12-Regular.ttf"))
            {
                Console.WriteLine("Font Load Error.");
            }
            if (!_lifeLabelSprite.InitFont("PixelMplus12-Regular.ttf"))
            {
                Console.WriteLine("Font Load Error.");
            }
            if (!_lifeSprite.InitFont("PixelMplus12-Regular.ttf"))
            {
                Console.WriteLine("Font Load Error.");
            }

            _titleLabelSprite.PrdScale(0.2);
            _scoreLabelSprite.PrdScale(0.2);
            _lifeLabelSprite.PrdScale(0.2);
            _scoreSprite.PrdScale(0.2);
            _lifeSprite.PrdScale(0.2);

            _titleLabelSprite.DrawText("Status");
            _scoreLabelSprite.DrawText("Score");
            _lifeLabelSprite.DrawText("Life");
        }