public TitleScene() { this.Camera.SetViewFromViewport(); _texture = new Texture2D("Application/images/title.png",false); _ti = new TextureInfo(_texture); SpriteUV titleScreen = new SpriteUV(_ti); titleScreen.Scale = _ti.TextureSizef; titleScreen.Pivot = new Vector2(0.5f,0.5f); titleScreen.Position = new Vector2(Director.Instance.GL.Context.GetViewport().Width/2, Director.Instance.GL.Context.GetViewport().Height/2); this.AddChild(titleScreen); Vector4 origColor = titleScreen.Color; titleScreen.Color = new Vector4(0,0,0,0); var tintAction = new TintTo(origColor,10.0f); ActionManager.Instance.AddAction(tintAction,titleScreen); tintAction.Run(); _titleSong = new Bgm("/Application/audio/titlesong.mp3"); if(_songPlayer != null) _songPlayer.Dispose(); _songPlayer = _titleSong.CreatePlayer(); Scheduler.Instance.ScheduleUpdateForTarget(this,0,false); // Clear any queued clicks so we dont immediately exit if coming in from the menu Touch.GetData(0).Clear(); }
public InstructionsScene() { this.Camera.SetViewFromViewport(); _texture = new Texture2D("/Application/assets/images/allSame.png",false); // started working out game logic in a seperate project Card Match Login _ti = new TextureInfo(_texture); SpriteUV titleScreen = new SpriteUV(_ti); titleScreen.Scale = _ti.TextureSizef; titleScreen.Pivot = new Vector2(0.5f,0.5f); titleScreen.Position = new Vector2(Director.Instance.GL.Context.GetViewport().Width/2, Director.Instance.GL.Context.GetViewport().Height/2); this.AddChild(titleScreen); Vector4 origColor = titleScreen.Color; titleScreen.Color = new Vector4(0,0,0,0); var tintAction = new TintTo(origColor,10.0f); ActionManager.Instance.AddAction(tintAction,titleScreen); tintAction.Run(); Scheduler.Instance.ScheduleUpdateForTarget(this,0,false); // Clear any queued clicks so we dont immediately exit if coming in from the menu Touch.GetData(0).Clear(); }
public TitleScene() { if(AppMain.am == null) { AppMain.am = new AudioManager(); } else { AppMain.am.changeSong(false); } this.Camera.SetViewFromViewport(); _texture = new Texture2D("/Application/images/title.png", false); _textureInfo = new TextureInfo(_texture); SpriteUV titleScreen = new SpriteUV(_textureInfo); titleScreen.Scale = _textureInfo.TextureSizef; titleScreen.Pivot = new Vector2(0.5f, 0.5f); ImageRect viewPort = Director.Instance.GL.Context.GetViewport(); titleScreen.Position = new Vector2(viewPort.Width/2, viewPort.Height/2); this.AddChild(titleScreen); Vector4 origColour = titleScreen.Color; titleScreen.Color = new Vector4(0,0,0,0); var tintAction = new TintTo(origColour, 10.0f); ActionManager.Instance.AddAction(tintAction, titleScreen); tintAction.Run(); Scheduler.Instance.ScheduleUpdateForTarget(this, 0, false); // Clear any queued clicks so we don't immediately exit if coming in from the menu Touch.GetData (0).Clear(); }
public TitleScene() { this.Camera.SetViewFromViewport(); _texture = new Texture2D("/Application/assets/images/header.png",false); _ti = new TextureInfo(_texture); SpriteUV titleScreen = new SpriteUV(_ti); titleScreen.Scale = _ti.TextureSizef; titleScreen.Pivot = new Vector2(0.5f,0.5f); titleScreen.Position = new Vector2(Director.Instance.GL.Context.GetViewport().Width/2, Director.Instance.GL.Context.GetViewport().Height/2); this.AddChild(titleScreen); Vector4 origColor = titleScreen.Color; titleScreen.Color = new Vector4(0,0,0,0); var tintAction = new TintTo(origColor,10.0f); ActionManager.Instance.AddAction(tintAction,titleScreen); tintAction.Run(); // MUSIC Support.MusicSystem.Instance.Play("play.mp3"); Scheduler.Instance.ScheduleUpdateForTarget(this,0,false); // Clear any queued clicks so we dont immediately exit if coming in from the menu Touch.GetData(0).Clear(); }
public TitleScene() { this.Camera.SetViewFromViewport(); m_texture = new Texture2D("Application/images/title.png", false); m_ti = new TextureInfo(m_texture); SpriteUV titleScreen = new SpriteUV(m_ti); titleScreen.Scale = m_ti.TextureSizef; titleScreen.Pivot = new Vector2(0.5f, 0.5f); titleScreen.Position = new Vector2(Director.Instance.GL.Context.GetViewport().Width / 2.0f, Director.Instance.GL.Context.GetViewport().Height / 2.0f); this.AddChild(titleScreen); Vector4 origColor = titleScreen.Color; titleScreen.Color = new Vector4(0, 0, 0, 0); var tintAction = new TintTo(origColor, 10.0f); ActionManager.Instance.AddAction(tintAction, titleScreen); tintAction.Run(); m_titleSong = new Bgm("/Application/audio/titlesong.mp3"); if (m_songPlayer != null) { m_songPlayer.Dispose(); } m_songPlayer = m_titleSong.CreatePlayer(); Scheduler.Instance.ScheduleUpdateForTarget(this, 0, false); // Clear any queued clicks so we dont immediately exit if coming in from the menu Touch.GetData(0).Clear(); }
private void setTintAction() { Vector4 originalColor = this.titleScreenSprite.Color; this.titleScreenSprite.Color = new Vector4(0,0,0,0); var tintAction = new TintTo(originalColor,10.0f); ActionManager.Instance.AddAction (tintAction, this.titleScreenSprite); tintAction.Run(); }