Exemplo n.º 1
0
 public void PlayBossDoorAnimation2(float storedX)
 {
     m_bossDoorSprite.ChangeSprite("LastDoorOpen_Character");
     m_bossDoorSprite.PlayAnimation(false);
     SoundManager.PlaySound("LastDoor_Open");
     Tween.To(Player.AttachedLevel.Camera, 1f, Quad.EaseInOut, "delay", "2", "X", storedX.ToString());
     Tween.RunFunction(3.1f, this, "BossDoorAnimationComplete");
 }
Exemplo n.º 2
0
 public void Intro4()
 {
     m_boss.PlayAnimation();
     m_bossShadow.ChangeSprite("EnemyFairyGhostBossIdle_Character");
     m_bossShadow.PlayAnimation();
     Tween.To(m_boss, 0.5f, Tween.EaseNone, "delay", "0.5", "Opacity", "1");
     Tween.To(m_bossShadow, 0.5f, Tween.EaseNone, "delay", "0.5", "Opacity", "0");
     Tween.AddEndHandlerToLastTween(this, "DisplayBossTitle", "The Forgotten", m_boss.Name, "Intro5");
 }
Exemplo n.º 3
0
 public void RunFountainCutscene2()
 {
     StartShake();
     SoundManager.PlaySound("Cutsc_StatueCrumble");
     m_fountain.ChangeSprite("FountainOfYouthShatter_Character");
     m_fountain.PlayAnimation(false);
     Player.AttachedLevel.ImpactEffectPool.DisplayFountainShatterSmoke(m_fountain);
     Tween.RunFunction(2f, this, "DisplaySecondBoss");
     Tween.RunFunction(2f, this, "RunFountainCutscene3");
 }
Exemplo n.º 4
0
 public override void Initialize()
 {
     m_boss = (EnemyList[0] as EnemyObj_Fairy);
     m_boss.PauseEnemy(true);
     m_bossShadow = new ObjContainer("EnemyFairyGhostBossMove_Character");
     m_boss.ChangeSprite("EnemyFairyGhostBossIdle_Character");
     m_bossShadow.TextureColor = Color.Black;
     m_bossShadow.Scale        = m_boss.Scale;
     m_bossShadow.PlayAnimation();
     GameObjList.Add(m_bossShadow);
     base.Initialize();
 }
Exemplo n.º 5
0
        public StartingRoomObj()
        {
            m_blacksmith                   = new BlacksmithObj();
            m_blacksmith.Flip              = SpriteEffects.FlipHorizontally;
            m_blacksmith.Scale             = new Vector2(2.5f, 2.5f);
            m_blacksmith.Position          = new Vector2(700f, 660f - (m_blacksmith.Bounds.Bottom - m_blacksmith.Y) - 1f);
            m_blacksmith.OutlineWidth      = 2;
            m_blacksmithBoard              = new SpriteObj("StartRoomBlacksmithBoard_Sprite");
            m_blacksmithBoard.Scale        = new Vector2(2f, 2f);
            m_blacksmithBoard.OutlineWidth = 2;
            m_blacksmithBoard.Position     = new Vector2(m_blacksmith.X - m_blacksmithBoard.Width / 2 - 35f,
                                                         m_blacksmith.Bounds.Bottom - m_blacksmithBoard.Height - 1);
            m_blacksmithIcon                 = new SpriteObj("UpArrowBubble_Sprite");
            m_blacksmithIcon.Scale           = new Vector2(2f, 2f);
            m_blacksmithIcon.Visible         = false;
            m_blacksmithIconPosition         = new Vector2(m_blacksmith.X - 60f, m_blacksmith.Y - 10f);
            m_blacksmithIcon.Flip            = m_blacksmith.Flip;
            m_blacksmithIcon.OutlineWidth    = 2;
            m_blacksmithNewIcon              = new SpriteObj("ExclamationSquare_Sprite");
            m_blacksmithNewIcon.Visible      = false;
            m_blacksmithNewIcon.OutlineWidth = 2;
            m_enchantressNewIcon             = (m_blacksmithNewIcon.Clone() as SpriteObj);
            m_enchantress          = new ObjContainer("Enchantress_Character");
            m_enchantress.Scale    = new Vector2(2f, 2f);
            m_enchantress.Flip     = SpriteEffects.FlipHorizontally;
            m_enchantress.Position = new Vector2(1150f,
                                                 660f - (m_enchantress.Bounds.Bottom - m_enchantress.AnchorY) - 2f);
            m_enchantress.PlayAnimation();
            m_enchantress.AnimationDelay = 0.1f;
            (m_enchantress.GetChildAt(4) as IAnimateableObj).StopAnimation();
            m_enchantress.OutlineWidth = 2;
            m_tent              = new SpriteObj("StartRoomGypsyTent_Sprite");
            m_tent.Scale        = new Vector2(1.5f, 1.5f);
            m_tent.OutlineWidth = 2;
            m_tent.Position     = new Vector2(m_enchantress.X - m_tent.Width / 2 + 5f,
                                              m_enchantress.Bounds.Bottom - m_tent.Height);
            m_enchantressIcon              = new SpriteObj("UpArrowBubble_Sprite");
            m_enchantressIcon.Scale        = new Vector2(2f, 2f);
            m_enchantressIcon.Visible      = false;
            m_enchantressIconPosition      = new Vector2(m_enchantress.X - 60f, m_enchantress.Y - 100f);
            m_enchantressIcon.Flip         = m_enchantress.Flip;
            m_enchantressIcon.OutlineWidth = 2;
            m_architect          = new ObjContainer("ArchitectIdle_Character");
            m_architect.Flip     = SpriteEffects.FlipHorizontally;
            m_architect.Scale    = new Vector2(2f, 2f);
            m_architect.Position = new Vector2(1550f, 660f - (m_architect.Bounds.Bottom - m_architect.AnchorY) - 2f);
            m_architect.PlayAnimation();
            m_architect.AnimationDelay = 0.1f;
            m_architect.OutlineWidth   = 2;
            (m_architect.GetChildAt(1) as IAnimateableObj).StopAnimation();
            m_architectIcon              = new SpriteObj("UpArrowBubble_Sprite");
            m_architectIcon.Scale        = new Vector2(2f, 2f);
            m_architectIcon.Visible      = false;
            m_architectIconPosition      = new Vector2(m_architect.X - 60f, m_architect.Y - 100f);
            m_architectIcon.Flip         = m_architect.Flip;
            m_architectIcon.OutlineWidth = 2;
            m_architectRenovating        = false;
            m_screw                      = new SpriteObj("ArchitectGear_Sprite");
            m_screw.Scale                = new Vector2(2f, 2f);
            m_screw.OutlineWidth         = 2;
            m_screw.Position             = new Vector2(m_architect.X + 30f, m_architect.Bounds.Bottom - 1);
            m_screw.AnimationDelay       = 0.1f;
            m_tollCollector              = new PhysicsObjContainer("NPCTollCollectorIdle_Character");
            m_tollCollector.Flip         = SpriteEffects.FlipHorizontally;
            m_tollCollector.Scale        = new Vector2(2.5f, 2.5f);
            m_tollCollector.IsWeighted   = false;
            m_tollCollector.IsCollidable = true;
            m_tollCollector.Position     = new Vector2(2565f,
                                                       420f - (m_tollCollector.Bounds.Bottom - m_tollCollector.AnchorY));
            m_tollCollector.PlayAnimation();
            m_tollCollector.AnimationDelay   = 0.1f;
            m_tollCollector.OutlineWidth     = 2;
            m_tollCollector.CollisionTypeTag = 1;
            m_tollCollectorIcon              = new SpriteObj("UpArrowBubble_Sprite");
            m_tollCollectorIcon.Scale        = new Vector2(2f, 2f);
            m_tollCollectorIcon.Visible      = false;
            m_tollCollectorIcon.Flip         = m_tollCollector.Flip;
            m_tollCollectorIcon.OutlineWidth = 2;
            m_rainFG = new List <RaindropObj>();
            var num = 400;

            if (LevelEV.SAVE_FRAMES)
            {
                num /= 2;
            }
            for (var i = 0; i < num; i++)
            {
                var item =
                    new RaindropObj(new Vector2(CDGMath.RandomInt(-100, 2540), CDGMath.RandomInt(-400, 720)));
                m_rainFG.Add(item);
            }
        }
Exemplo n.º 6
0
        public void SetPlayerStyle(string animationType)
        {
            m_playerSprite.ChangeSprite("Player" + animationType + "_Character");
            PlayerObj player = (ScreenManager as RCScreenManager).Player;

            for (int i = 0; i < m_playerSprite.NumChildren; i++)
            {
                var src = player.GetChildAt(i);
                var dst = m_playerSprite.GetChildAt(i);

                dst.TextureColor = src.TextureColor;
                dst.Visible      = src.Visible;
            }
            m_playerSprite.Scale         = player.Scale;
            m_playerSprite.OutlineColour = player.OutlineColour;


            //m_playerSprite.ChangeSprite("Player" + animationType + "_Character");
            //PlayerObj player = (base.ScreenManager as RCScreenManager).Player;

            //for (int i = 0; i < m_playerSprite.NumChildren; i++)
            //{
            //    m_playerSprite.GetChildAt(i).TextureColor = player.GetChildAt(i).TextureColor;
            //    m_playerSprite.GetChildAt(i).Visible = player.GetChildAt(i).Visible;
            //}

            //m_playerSprite.GetChildAt(16).Visible = false;
            //m_playerSprite.Scale = player.Scale;
            //if (Game.PlayerStats.Traits.X == 8f || Game.PlayerStats.Traits.Y == 8f)
            //{
            //    m_playerSprite.GetChildAt(7).Visible = false;
            //}
            //m_playerSprite.GetChildAt(14).Visible = false;
            //if (Game.PlayerStats.SpecialItem == 8)
            //{
            //    m_playerSprite.GetChildAt(14).Visible = true;
            //}
            //if (Game.PlayerStats.Class == 0 || Game.PlayerStats.Class == 8)
            //{
            //    m_playerSprite.GetChildAt(15).Visible = true;
            //    m_playerSprite.GetChildAt(15).ChangeSprite(string.Concat("Player", animationType, "Shield_Sprite"));
            //}
            //else if (Game.PlayerStats.Class == 5 || Game.PlayerStats.Class == 13)
            //{
            //    m_playerSprite.GetChildAt(15).Visible = true;
            //    m_playerSprite.GetChildAt(15).ChangeSprite(string.Concat("Player", animationType, "Lamp_Sprite"));
            //}
            //else if (Game.PlayerStats.Class == 1 || Game.PlayerStats.Class == 9)
            //{
            //    m_playerSprite.GetChildAt(15).Visible = true;
            //    m_playerSprite.GetChildAt(15).ChangeSprite(string.Concat("Player", animationType, "Beard_Sprite"));
            //}
            //else if (Game.PlayerStats.Class == 4 || Game.PlayerStats.Class == 12)
            //{
            //    m_playerSprite.GetChildAt(15).Visible = true;
            //    m_playerSprite.GetChildAt(15).ChangeSprite(string.Concat("Player", animationType, "Headband_Sprite"));
            //}
            //else if (Game.PlayerStats.Class == 2 || Game.PlayerStats.Class == 10)
            //{
            //    m_playerSprite.GetChildAt(15).Visible = true;
            //    m_playerSprite.GetChildAt(15).ChangeSprite(string.Concat("Player", animationType, "Horns_Sprite"));
            //}
            //else
            //{
            //    m_playerSprite.GetChildAt(15).Visible = false;
            //}
            //m_playerSprite.GetChildAt(0).Visible = false;
            //if (Game.PlayerStats.Class == 16)
            //{
            //    m_playerSprite.GetChildAt(0).Visible = true;
            //    GameObj childAt = m_playerSprite.GetChildAt(12);
            //    object[] objArray = new object[] { "Player", animationType, "Head", 6, "_Sprite" };
            //    childAt.ChangeSprite(string.Concat(objArray));
            //}
            //if (Game.PlayerStats.Class == 17)
            //{
            //    GameObj gameObj = m_playerSprite.GetChildAt(12);
            //    object[] objArray1 = new object[] { "Player", animationType, "Head", 7, "_Sprite" };
            //    gameObj.ChangeSprite(string.Concat(objArray1));
            //}
            //if (Game.PlayerStats.IsFemale)
            //{
            //    m_playerSprite.GetChildAt(5).Visible = true;
            //    m_playerSprite.GetChildAt(13).Visible = true;
            //}
            //else
            //{
            //    m_playerSprite.GetChildAt(5).Visible = false;
            //    m_playerSprite.GetChildAt(13).Visible = false;
            //}
            //if (Game.PlayerStats.Traits.X == 6f || Game.PlayerStats.Traits.Y == 6f)
            //{
            //    m_playerSprite.Scale = new Vector2(3f, 3f);
            //}
            //if (Game.PlayerStats.Traits.X == 7f || Game.PlayerStats.Traits.Y == 7f)
            //{
            //    m_playerSprite.Scale = new Vector2(1.35f, 1.35f);
            //}
            //if (Game.PlayerStats.Traits.X == 10f || Game.PlayerStats.Traits.Y == 10f)
            //{
            //    ObjContainer mPlayerSprite = m_playerSprite;
            //    mPlayerSprite.ScaleX = mPlayerSprite.ScaleX * 0.825f;
            //    ObjContainer scaleY = m_playerSprite;
            //    scaleY.ScaleY = scaleY.ScaleY * 1.25f;
            //}
            //if (Game.PlayerStats.Traits.X == 9f || Game.PlayerStats.Traits.Y == 9f)
            //{
            //    ObjContainer scaleX = m_playerSprite;
            //    scaleX.ScaleX = scaleX.ScaleX * 1.25f;
            //    ObjContainer objContainer = m_playerSprite;
            //    objContainer.ScaleY = objContainer.ScaleY * 1.175f;
            //}
            //if (Game.PlayerStats.Class == 6 || Game.PlayerStats.Class == 14)
            //{
            //    m_playerSprite.OutlineColour = Color.White;
            //    m_playerSprite.GetChildAt(10).Visible = false;
            //    m_playerSprite.GetChildAt(11).Visible = false;
            //}
            //else
            //{
            //    m_playerSprite.OutlineColour = Color.Black;
            //    m_playerSprite.GetChildAt(10).Visible = true;
            //    m_playerSprite.GetChildAt(11).Visible = true;
            //}
            //string spriteName = (m_playerSprite.GetChildAt(12) as IAnimateableObj).SpriteName;
            //int num = spriteName.IndexOf("_") - 1;
            //spriteName = spriteName.Remove(num, 1);
            //if (Game.PlayerStats.Class != 16)
            //{
            //    spriteName = (Game.PlayerStats.Class != 17 ? spriteName.Replace("_", string.Concat(Game.PlayerStats.HeadPiece, "_")) : spriteName.Replace("_", string.Concat(7, "_")));
            //}
            //else
            //{
            //    spriteName = spriteName.Replace("_", string.Concat(6, "_"));
            //}
            //m_playerSprite.GetChildAt(12).ChangeSprite(spriteName);
            //string str = (m_playerSprite.GetChildAt(4) as IAnimateableObj).SpriteName;
            //num = str.IndexOf("_") - 1;
            //str = str.Remove(num, 1);
            //str = str.Replace("_", string.Concat(Game.PlayerStats.ChestPiece, "_"));
            //m_playerSprite.GetChildAt(4).ChangeSprite(str);
            //string spriteName1 = (m_playerSprite.GetChildAt(9) as IAnimateableObj).SpriteName;
            //num = spriteName1.IndexOf("_") - 1;
            //spriteName1 = spriteName1.Remove(num, 1);
            //spriteName1 = spriteName1.Replace("_", string.Concat(Game.PlayerStats.ShoulderPiece, "_"));
            //m_playerSprite.GetChildAt(9).ChangeSprite(spriteName1);
            //string str1 = (m_playerSprite.GetChildAt(3) as IAnimateableObj).SpriteName;
            //num = str1.IndexOf("_") - 1;
            //str1 = str1.Remove(num, 1);
            //str1 = str1.Replace("_", string.Concat(Game.PlayerStats.ShoulderPiece, "_"));
            //m_playerSprite.GetChildAt(3).ChangeSprite(str1);

            m_playerSprite.PlayAnimation(true);
            m_playerSprite.CalculateBounds();
            m_playerSprite.Y = 435f - (m_playerSprite.Bounds.Bottom - m_playerSprite.Y);
        }
Exemplo n.º 7
0
        public override void LoadContent()
        {
            m_mapDisplay.InitializeAlphaMap(new Rectangle(50, 50, 1220, 620), Camera);
            m_mapDisplay.CameraOffset = new Vector2(660f, 360f);
            m_legend           = new ObjContainer();
            m_legend.ForceDraw = true;
            var spriteObj = new SpriteObj("TraitsScreenPlate_Sprite");

            m_legend.AddChild(spriteObj);
            spriteObj.Scale = new Vector2(0.75f, 0.58f);
            var textObj = new TextObj(Game.JunicodeFont);

            textObj.Align        = Types.TextAlign.Centre;
            textObj.Position     = new Vector2(m_legend.Width / 2 * spriteObj.ScaleX, m_legend.Bounds.Top + 10);
            textObj.Text         = "Legend";
            textObj.FontSize     = 12f;
            textObj.DropShadow   = new Vector2(2f, 2f);
            textObj.TextureColor = new Color(213, 213, 173);
            m_legend.AddChild(textObj);
            m_legend.AnimationDelay = 0.0333333351f;
            m_legend.Position       = new Vector2(1320 - m_legend.Width - 20, 720 - m_legend.Height - 20);
            var spriteObj2 = new SpriteObj("MapPlayerIcon_Sprite");

            spriteObj2.Position = new Vector2(30f, 60f);
            spriteObj2.PlayAnimation();
            m_legend.AddChild(spriteObj2);
            var num        = 30;
            var spriteObj3 = new SpriteObj("MapBossIcon_Sprite");

            spriteObj3.Position = new Vector2(spriteObj2.X, spriteObj2.Y + num);
            spriteObj3.PlayAnimation();
            m_legend.AddChild(spriteObj3);
            var spriteObj4 = new SpriteObj("MapLockedChestIcon_Sprite");

            spriteObj4.Position = new Vector2(spriteObj2.X, spriteObj3.Y + num);
            spriteObj4.PlayAnimation();
            m_legend.AddChild(spriteObj4);
            var spriteObj5 = new SpriteObj("MapFairyChestIcon_Sprite");

            spriteObj5.Position = new Vector2(spriteObj2.X, spriteObj4.Y + num);
            spriteObj5.PlayAnimation();
            m_legend.AddChild(spriteObj5);
            var spriteObj6 = new SpriteObj("MapChestUnlocked_Sprite");

            spriteObj6.Position = new Vector2(spriteObj2.X, spriteObj5.Y + num);
            m_legend.AddChild(spriteObj6);
            var spriteObj7 = new SpriteObj("MapTeleporterIcon_Sprite");

            spriteObj7.Position = new Vector2(spriteObj2.X, spriteObj6.Y + num);
            spriteObj7.PlayAnimation();
            m_legend.AddChild(spriteObj7);
            var spriteObj8 = new SpriteObj("MapBonusIcon_Sprite");

            spriteObj8.Position = new Vector2(spriteObj2.X, spriteObj7.Y + num);
            spriteObj8.PlayAnimation();
            m_legend.AddChild(spriteObj8);
            var textObj2 = new TextObj(Game.JunicodeFont);

            textObj2.Position = new Vector2(spriteObj2.X + 50f, 55f);
            textObj2.Text     =
                "You are here \nBoss location \nUnopened chest \nFairy chest \nOpened chest \nTeleporter \nBonus Room";
            textObj2.FontSize   = 10f;
            textObj2.DropShadow = new Vector2(2f, 2f);
            m_legend.AddChild(textObj2);
            spriteObj2.X               += 4f;
            spriteObj2.Y               += 4f;
            m_titleText                 = new SpriteObj("TeleporterTitleText_Sprite");
            m_titleText.ForceDraw       = true;
            m_titleText.X               = 660f;
            m_titleText.Y               = 72f;
            m_playerIcon                = new ObjContainer("PlayerWalking_Character");
            m_playerIcon.Scale          = new Vector2(0.6f, 0.6f);
            m_playerIcon.AnimationDelay = 0.1f;
            m_playerIcon.PlayAnimation();
            m_playerIcon.ForceDraw    = true;
            m_playerIcon.OutlineWidth = 2;
            m_playerIcon.GetChildAt(1).TextureColor = Color.Red;
            m_playerIcon.GetChildAt(7).TextureColor = Color.Red;
            m_playerIcon.GetChildAt(8).TextureColor = Color.Red;
            m_playerIcon.GetChildAt(16).Visible     = false;
            m_playerIcon.GetChildAt(5).Visible      = false;
            m_playerIcon.GetChildAt(13).Visible     = false;
            m_playerIcon.GetChildAt(0).Visible      = false;
            m_playerIcon.GetChildAt(15).Visible     = false;
            m_playerIcon.GetChildAt(14).Visible     = false;
            m_continueText             = new KeyIconTextObj(Game.JunicodeFont);
            m_continueText.Text        = "to close map";
            m_continueText.FontSize    = 12f;
            m_continueText.ForceDraw   = true;
            m_continueText.Position    = new Vector2(50f, 200 - m_continueText.Height - 40);
            m_recentreText             = new KeyIconTextObj(Game.JunicodeFont);
            m_recentreText.Text        = "to re-center on player";
            m_recentreText.FontSize    = 12f;
            m_recentreText.Position    = new Vector2(m_continueText.X, 200 - m_continueText.Height - 80);
            m_recentreText.ForceDraw   = true;
            m_navigationText           = new KeyIconTextObj(Game.JunicodeFont);
            m_navigationText.Text      = "to move map";
            m_navigationText.FontSize  = 12f;
            m_navigationText.Position  = new Vector2(m_continueText.X, 200 - m_continueText.Height - 120);
            m_navigationText.ForceDraw = true;
            base.LoadContent();
        }