예제 #1
0
        public void DisplayStringNumberText(string text, int amount, Color color, Vector2 position)
        {
            var textObj = m_resourcePool.CheckOut();

            textObj.Font     = Game.JunicodeFont;
            textObj.FontSize = 14f;
            textObj.Text     = text + " " + amount;
            var width = textObj.Width;

            m_resourcePool.CheckIn(textObj);
            var textObj2 = m_resourcePool.CheckOut();

            textObj2.Font         = Game.JunicodeFont;
            textObj2.Text         = text + " ";
            textObj2.FontSize     = 14f;
            textObj2.TextureColor = color;
            textObj2.Position     = new Vector2(position.X - width / 2f, position.Y - textObj2.Height / 2f);
            textObj2.Visible      = true;
            var textObj3 = m_resourcePool.CheckOut();

            textObj3.Font         = Game.HerzogFont;
            textObj3.Text         = amount.ToString();
            textObj3.FontSize     = 18f;
            textObj3.TextureColor = color;
            textObj3.Position     = new Vector2(textObj2.X + textObj2.Width, textObj2.Y + 5f);
            textObj3.Visible      = true;
            Tween.By(textObj3, 0.3f, Quad.EaseOut, "Y", "-60");
            Tween.To(textObj3, 0.2f, Linear.EaseNone, "delay", "0.5", "Opacity", "0");
            Tween.AddEndHandlerToLastTween(this, "DestroyText", textObj3);
            Tween.By(textObj2, 0.3f, Quad.EaseOut, "Y", "-60");
            Tween.To(textObj2, 0.2f, Linear.EaseNone, "delay", "0.5", "Opacity", "0");
            Tween.AddEndHandlerToLastTween(this, "DestroyText", textObj2);
        }
예제 #2
0
 private void TweenInText(GameObj obj, float delay)
 {
     obj.Opacity = 0f;
     obj.Y      -= 50f;
     Tween.To(obj, 0.5f, Tween.EaseNone, "delay", delay.ToString(), "Opacity", "1");
     Tween.By(obj, 0.5f, Quad.EaseOut, "delay", delay.ToString(), "Y", "50");
 }
예제 #3
0
        public void Call(object target = null)
        {
            var props = Properties.Copy();

            var tween = Offset
                ? Tween.By(Target ?? target, Duration, Easing, props)
                : Tween.To(Target ?? target, Duration, Easing, props);

            if (InitialValues != null)
            {
                SetInitialValues(tween, InitialValues.Copy());
            }

            if (EndHandler != null)
            {
                var args = EndHandler.Arguments?.Copy();

                if (EndHandler.Target is Type)
                {
                    tween.EndHandler(EndHandler.Target as Type, EndHandler.Function, args);
                }
                else
                {
                    tween.EndHandler(EndHandler.Target ?? target, EndHandler.Function, args);
                }
            }
        }
예제 #4
0
 public void ActivateTarget()
 {
     if (m_numTargets - m_currentTargetIndex < m_targetIcons.NumChildren)
     {
         m_targetIcons.GetChildAt(m_numTargets - m_currentTargetIndex).Visible = false;
         GiveGold();
     }
     if (m_currentTargetIndex >= m_numTargets)
     {
         m_currentTarget = null;
         return;
     }
     if (m_currentTarget != null)
     {
         m_targetSpeed += m_targetSpeedMod;
     }
     m_currentTarget         = m_targetList[m_currentTargetIndex];
     m_currentTarget.Visible = true;
     if (!IsReversed)
     {
         Tween.By(m_currentTarget, 2f, Quad.EaseOut, "X", (-400 + CDGMath.RandomInt(-200, 200)).ToString());
         return;
     }
     Tween.By(m_currentTarget, 2f, Quad.EaseOut, "X", (400 + CDGMath.RandomInt(-200, 200)).ToString());
 }
예제 #5
0
        private void ExitTransition()
        {
            SoundManager.PlaySound("DialogMenuClose");
            m_transitioning = true;
            Tween.To(m_confirmText, 0.2f, Tween.EaseNone, "Opacity", "0");
            Tween.To(m_cancelText, 0.2f, Tween.EaseNone, "Opacity", "0");
            Tween.To(m_navigationText, 0.2f, Tween.EaseNone, "Opacity", "0");
            Tween.To(this, 0.2f, Tween.EaseNone, "BackBufferOpacity", "0");
            Tween.To(m_optionsBar, 0.2f, Tween.EaseNone, "Opacity", "0");
            m_bgSprite.Position = new Vector2(660f, 360f);
            m_bgSprite.Opacity  = 1f;
            Tween.To(m_bgSprite, 0.5f, Quad.EaseOut, "Y", "0");
            Tween.To(m_bgSprite, 0.2f, Tween.EaseNone, "Opacity", "0");
            var num = 0;

            foreach (var current in m_optionsArray)
            {
                current.Y       = 160 + num * 30;
                current.Opacity = 1f;
                Tween.By(current, 0.5f, Quad.EaseOut, "Y", (-360f).ToString());
                Tween.To(current, 0.2f, Tween.EaseNone, "Opacity", "0");
                num++;
            }
            Tween.AddEndHandlerToLastTween(ScreenManager, "HideCurrentScreen");
        }
예제 #6
0
 public void PlayChestGame()
 {
     if (Game.PlayerStats.Gold >= 4)
     {
         m_paid = true;
         float num;
         if (ID == 1)
         {
             num = 0.25f;
         }
         else if (ID == 2)
         {
             num = 0.5f;
         }
         else
         {
             num = 0.75f;
         }
         var num2 = (int)(Game.PlayerStats.Gold * num);
         Game.PlayerStats.Gold -= num2;
         ShuffleChests(num2);
         Player.AttachedLevel.TextManager.DisplayNumberStringText(-num2, "gold", Color.Yellow,
                                                                  new Vector2(Player.X, Player.Bounds.Top));
         Tween.By(m_gate, 1f, Quad.EaseInOut, "Y", (-m_gate.Height).ToString());
         return;
     }
     (Player.AttachedLevel.ScreenManager as RCScreenManager).DialogueScreen.SetDialogue("ChestBonusRoom1-NoMoney");
     Tween.To(this, 0f, Linear.EaseNone);
     Tween.AddEndHandlerToLastTween(Player.AttachedLevel.ScreenManager, "DisplayScreen", 13, true,
                                    typeof(List <object>));
 }
예제 #7
0
 public void CloseGate(bool animate)
 {
     if (animate)
     {
         Player.Y     = 381f;
         Player.X    += 10f;
         Player.State = 1;
         var logicSet = new LogicSet(Player);
         logicSet.AddAction(new RunFunctionLogicAction(Player, "LockControls"));
         logicSet.AddAction(new MoveDirectionLogicAction(new Vector2(1f, 0f)));
         logicSet.AddAction(new ChangeSpriteLogicAction("PlayerWalking_Character"));
         logicSet.AddAction(new PlayAnimationLogicAction());
         logicSet.AddAction(new ChangePropertyLogicAction(Player, "CurrentSpeed", 200));
         logicSet.AddAction(new DelayLogicAction(0.2f));
         logicSet.AddAction(new ChangePropertyLogicAction(Player, "CurrentSpeed", 0));
         Player.RunExternalLogicSet(logicSet);
         Tween.By(m_castleGate, 1.5f, Quad.EaseOut, "Y", m_castleGate.Height.ToString());
         Tween.AddEndHandlerToLastTween(Player, "UnlockControls");
         Player.AttachedLevel.RunCinematicBorders(1.5f);
     }
     else
     {
         m_castleGate.Y += m_castleGate.Height;
     }
     m_gateClosed = true;
 }
예제 #8
0
        private void ExitTransition()
        {
            SoundManager.PlaySound("DialogMenuClose");
            var num  = 0;
            var num2 = 0f;

            foreach (var current in m_diaryList)
            {
                if (current.Visible)
                {
                    current.Opacity = 1f;
                    if (num >= 5)
                    {
                        num   = 0;
                        num2 += 0.05f;
                    }
                    num++;
                    Tween.To(current, 0.25f, Tween.EaseNone, "delay", num2.ToString(), "Opacity", "0");
                    Tween.By(current, 0.25f, Quad.EaseOut, "delay", num2.ToString(), "Y", "-50");
                }
            }
            m_titleText.Opacity = 1f;
            Tween.To(m_titleText, 0.25f, Tween.EaseNone, "Opacity", "0");
            m_inputDelay = 1f;
            Tween.To(this, 0.5f, Tween.EaseNone, "BackBufferOpacity", "0");
            Tween.AddEndHandlerToLastTween(ScreenManager, "HideCurrentScreen");
        }
예제 #9
0
 public static void FadeOutOffset(ProjectileObj proj, bool hitPlayer)
 {
     Tween.StopAllContaining(proj, false);
     proj.IsCollidable = false;
     Tween.By(proj, 0.3f, Linear.EaseNone, "X", CDGMath.RandomInt(-50, 50).ToString(), "Y", CDGMath.RandomInt(-100, 100).ToString());
     Tween.To(proj, 0.3f, Linear.EaseNone, "Opacity", "0");
     Tween.AddEndHandlerToLastTween(proj, "KillProjectile");
 }
예제 #10
0
 public void EndWipeTransition()
 {
     m_isWipeTransitioning  = false;
     m_blackTransitionOut.Y = -500f;
     Tween.By(m_blackTransitionIn, 0.25f, Quad.EaseInOut, "X", "-3000");
     Tween.By(m_blackScreen, 0.25f, Quad.EaseInOut, "X", "-3000");
     Tween.By(m_blackTransitionOut, 0.25f, Quad.EaseInOut, "X", "-3000");
 }
예제 #11
0
 public void DropFrame()
 {
     m_frameDropping = true;
     Tween.By(m_frameSprite, 0.7f, Back.EaseOut, "X", (-(float)m_frameSprite.Width / 2f - 2f).ToString(), "Y",
              "30", "Rotation", "45");
     Tween.By(m_playerSprite, 0.7f, Back.EaseOut, "X", (-(float)m_frameSprite.Width / 2f - 2f).ToString(), "Y",
              "30", "Rotation", "45");
     Tween.RunFunction(1.5f, this, "DropFrame2");
 }
예제 #12
0
        public override void OnEnter()
        {
            m_quickDropText.Visible = false;
            if (InputManager.GamePadIsConnected(PlayerIndex.One))
            {
                m_confirmText.ForcedScale = new Vector2(0.7f, 0.7f);
                m_cancelText.ForcedScale  = new Vector2(0.7f, 0.7f);
                m_navigationText.Text     = "[Button:LeftStick] to navigate options";
            }
            else
            {
                m_confirmText.ForcedScale = new Vector2(1f, 1f);
                m_cancelText.ForcedScale  = new Vector2(1f, 1f);
                m_navigationText.Text     = "Arrow keys to navigate options";
            }
            m_confirmText.Text       = "[Input:" + 0 + "] to select option";
            m_cancelText.Text        = "[Input:" + 2 + "] to exit options";
            m_confirmText.Opacity    = 0f;
            m_cancelText.Opacity     = 0f;
            m_navigationText.Opacity = 0f;
            Tween.To(m_confirmText, 0.2f, Tween.EaseNone, "Opacity", "1");
            Tween.To(m_cancelText, 0.2f, Tween.EaseNone, "Opacity", "1");
            Tween.To(m_navigationText, 0.2f, Tween.EaseNone, "Opacity", "1");
            Tween.RunFunction(0.1f, typeof(SoundManager), "PlaySound", "DialogueMenuOpen");
            if (!m_optionsArray.Contains(m_backToMenuObj))
            {
                m_optionsArray.Insert(m_optionsArray.Count - 1, m_backToMenuObj);
            }
            if (m_titleScreenOptions)
            {
                m_optionsArray.RemoveAt(m_optionsArray.Count - 2);
            }
            m_transitioning = true;
            Tween.To(this, 0.2f, Tween.EaseNone, "BackBufferOpacity", "0.8");
            m_selectedOptionIndex     = 0;
            m_selectedOption          = m_optionsArray[m_selectedOptionIndex];
            m_selectedOption.IsActive = false;
            m_bgSprite.Position       = new Vector2(660f, 0f);
            m_bgSprite.Opacity        = 0f;
            Tween.To(m_bgSprite, 0.5f, Quad.EaseOut, "Y", 360f.ToString());
            Tween.AddEndHandlerToLastTween(this, "EndTransition");
            Tween.To(m_bgSprite, 0.2f, Tween.EaseNone, "Opacity", "1");
            var num = 0;

            foreach (var current in m_optionsArray)
            {
                current.Y       = 160 + num * 30 - 360f;
                current.Opacity = 0f;
                Tween.By(current, 0.5f, Quad.EaseOut, "Y", 360f.ToString());
                Tween.To(current, 0.2f, Tween.EaseNone, "Opacity", "1");
                current.Initialize();
                num++;
            }
            m_optionsBar.Opacity = 0f;
            Tween.To(m_optionsBar, 0.2f, Tween.EaseNone, "Opacity", "1");
            base.OnEnter();
        }
예제 #13
0
 public void Intro2()
 {
     m_bossShadow.Position = new Vector2(Bounds.Right - 100, Bounds.Bottom - 400);
     m_bossShadow.Flip     = SpriteEffects.FlipHorizontally;
     Tween.To(Player.AttachedLevel.Camera, 1f, Quad.EaseInOut, "X", (Bounds.Right - 900).ToString(), "Y",
              (Bounds.Bottom - 400).ToString());
     Tween.By(m_bossShadow, 0.5f, Tween.EaseNone, "delay", "1", "X", "-3000");
     Tween.RunFunction(1.8f, this, "Intro3");
     Tween.RunFunction(0.2f, typeof(SoundManager), "PlaySound", "Boss_Flameskull_Whoosh_02");
 }
예제 #14
0
 public void Intro3()
 {
     m_bossShadow.Position = m_boss.Position;
     m_bossShadow.X       -= 1500f;
     m_bossShadow.Flip     = SpriteEffects.None;
     Tween.To(Player.AttachedLevel.Camera, 1f, Quad.EaseInOut, "X", m_boss.X.ToString(), "Y", m_boss.Y.ToString());
     Tween.By(m_bossShadow, 1f, Quad.EaseOut, "delay", "1", "X", "1500");
     Tween.RunFunction(1.8f, this, "Intro4");
     Tween.RunFunction(0.2f, typeof(SoundManager), "PlaySound", "Boss_Flameskull_Spawn");
 }
예제 #15
0
        public static ProjectileObj Fire(GameObj source)
        {
            var proj = Instance.Fire(source, null, null);

            proj.Opacity = 0;
            proj.Y      -= 20f;
            Tween.By(proj, 0.1f, Tween.EaseNone, "Y", "20");
            Tween.To(proj, 0.1f, Tween.EaseNone, "Opacity", "1");

            return(proj);
        }
예제 #16
0
 public override void OnEnter()
 {
     BackBufferOpacity = 0f;
     m_gameCrashed     = false;
     if (Game.PlayerStats.Traits.X == 32f || Game.PlayerStats.Traits.Y == 32f)
     {
         m_loadingText.Text = "Jacking In";
     }
     else if (Game.PlayerStats.Traits.X == 29f || Game.PlayerStats.Traits.Y == 29f)
     {
         m_loadingText.Text = "Reminiscing";
     }
     else if (Game.PlayerStats.Traits.X == 8f || Game.PlayerStats.Traits.Y == 8f)
     {
         m_loadingText.Text = "Balding";
     }
     else
     {
         m_loadingText.Text = "Building";
     }
     if (!m_loadingComplete)
     {
         if (m_screenTypeToLoad == 27)
         {
             Tween.To(this, 0.05f, Tween.EaseNone, "BackBufferOpacity", "1");
             Tween.RunFunction(1f, this, "BeginThreading");
         }
         else
         {
             m_blackTransitionIn.X  = 0f;
             m_blackTransitionIn.X  = 1320 - m_blackTransitionIn.Bounds.Left;
             m_blackScreen.X        = m_blackTransitionIn.X;
             m_blackTransitionOut.X = m_blackScreen.X + m_blackScreen.Width;
             if (!m_wipeTransition)
             {
                 SoundManager.PlaySound("GateDrop");
                 Tween.To(m_gateSprite, 0.5f, Tween.EaseNone, "Y", "0");
                 Tween.RunFunction(0.3f, m_effectPool, "LoadingGateSmokeEffect", 40);
                 Tween.RunFunction(0.3f, typeof(SoundManager), "PlaySound", "GateSlam");
                 Tween.RunFunction(0.55f, this, "ShakeScreen", 4, true, true);
                 Tween.RunFunction(0.65f, this, "StopScreenShake");
                 Tween.RunFunction(1.5f, this, "BeginThreading");
             }
             else
             {
                 Tween.By(m_blackTransitionIn, 0.15f, Quad.EaseIn, "X", (-m_blackTransitionIn.X).ToString());
                 Tween.By(m_blackScreen, 0.15f, Quad.EaseIn, "X", (-m_blackTransitionIn.X).ToString());
                 Tween.By(m_blackTransitionOut, 0.2f, Quad.EaseIn, "X", (-m_blackTransitionIn.X).ToString());
                 Tween.AddEndHandlerToLastTween(this, "BeginThreading");
             }
         }
         base.OnEnter();
     }
 }
예제 #17
0
 public void SetChestUnlocked()
 {
     if (ConditionType != 10 && ConditionType != 0)
     {
         m_player.AttachedLevel.ObjectiveComplete();
     }
     State = 1;
     m_lockSprite.PlayAnimation(false);
     Tween.By(m_lockSprite, 0.2f, Linear.EaseNone, "Y", "40");
     Tween.To(m_lockSprite, 0.2f, Linear.EaseNone, "delay", "0.1", "Opacity", "0");
 }
예제 #18
0
 public override void OnEnter()
 {
     Camera.Zoom             = 1f;
     m_profileSelectKey.Text = string.Concat("[Input:", 25, "] to Change Profile (", Game.GameConfig.ProfileSlot,
                                             ")");
     SoundManager.PlayMusic("TitleScreenSong", true, 1f);
     Game.ScreenManager.Player.ForceInvincible = false;
     m_optionsEntered   = false;
     m_startNewLegacy   = false;
     m_heroIsDead       = false;
     m_startNewGamePlus = false;
     m_loadStartingRoom = false;
     m_bg.TextureColor  = Color.Red;
     m_crown.Visible    = false;
     m_randomSeagullSFX = CDGMath.RandomInt(1, 5);
     m_startPressed     = false;
     Tween.By(m_godRay, 5f, Quad.EaseInOut, "Y", "-0.23");
     m_logo.Opacity  = 0f;
     m_logo.Position = new Vector2(660f, 310f);
     Tween.To(m_logo, 2f, Linear.EaseNone, "Opacity", "1");
     Tween.To(m_logo, 3f, Quad.EaseInOut, "Y", "360");
     m_crown.Opacity  = 0f;
     m_crown.Position = new Vector2(390f, 200f);
     Tween.To(m_crown, 2f, Linear.EaseNone, "Opacity", "1");
     Tween.By(m_crown, 3f, Quad.EaseInOut, "Y", "50");
     m_dlcIcon.Opacity = 0f;
     m_dlcIcon.Visible = false;
     if (Game.PlayerStats.ChallengeLastBossBeaten)
     {
         m_dlcIcon.Visible = true;
     }
     m_dlcIcon.Position = new Vector2(898f, 267f);
     Tween.To(m_dlcIcon, 2f, Linear.EaseNone, "Opacity", "1");
     Tween.By(m_dlcIcon, 3f, Quad.EaseInOut, "Y", "50");
     Camera.Position       = new Vector2(660f, 360f);
     m_pressStartText.Text = "[Input:" + 0 + "]";
     LoadSaveData();
     Game.PlayerStats.TutorialComplete = true;
     m_startNewLegacy   = !Game.PlayerStats.CharacterFound;
     m_heroIsDead       = Game.PlayerStats.IsDead;
     m_startNewGamePlus = Game.PlayerStats.LastbossBeaten;
     m_loadStartingRoom = Game.PlayerStats.LoadStartingRoom;
     if (Game.PlayerStats.TimesCastleBeaten > 0)
     {
         m_crown.Visible   = true;
         m_bg.TextureColor = Color.White;
     }
     InitializeStartingText();
     base.OnEnter();
 }
예제 #19
0
 private void ShowSilhouette(bool showSanta)
 {
     if (m_levelScreen != null)
     {
         m_silhouetteFlying    = true;
         m_silhouette.Rotation = 0f;
         m_silhouette.Flip     = SpriteEffects.None;
         var flag = false;
         if (CDGMath.RandomInt(0, 1) > 0)
         {
             flag = true;
         }
         string[] array =
         {
             "GardenBat_Sprite",
             "GardenCrow_Sprite",
             "GardenBat_Sprite",
             "GardenCrow_Sprite",
             "GardenPerson_Sprite"
         };
         if (!showSanta)
         {
             m_silhouette.ChangeSprite(array[CDGMath.RandomInt(0, 4)]);
         }
         else
         {
             m_silhouette.ChangeSprite("GardenSanta_Sprite");
         }
         m_silhouette.PlayAnimation();
         var arg_A7_0 = Vector2.Zero;
         if (flag)
         {
             m_silhouette.X = -(float)m_silhouette.Width;
         }
         else
         {
             m_silhouette.Flip = SpriteEffects.FlipHorizontally;
             m_silhouette.X    = m_levelScreen.CurrentRoom.Width + m_silhouette.Width;
         }
         m_silhouette.Y = CDGMath.RandomFloat(100f, 500f);
         var num = m_levelScreen.CurrentRoom.Bounds.Width + m_silhouette.Width * 2;
         if (!flag)
         {
             num = -num;
         }
         Tween.By(m_silhouette, CDGMath.RandomFloat(10f, 15f), Tween.EaseNone, "X", num.ToString(), "Y",
                  CDGMath.RandomInt(-200, 200).ToString());
         Tween.AddEndHandlerToLastTween(this, "SilhouetteComplete");
     }
 }
예제 #20
0
        public void DisplayBossTitle(string bossTitle1, string bossTitle2, string endHandler)
        {
            SoundManager.PlaySound("Boss_Title");
            m_bossTitle1.Text = bossTitle1;
            m_bossTitle2.Text = bossTitle2;
            var camera = Player.AttachedLevel.Camera;

            if (Player.AttachedLevel.CurrentRoom is LastBossRoom)
            {
                m_bossTitle1.Position = new Vector2(camera.X - 550f, camera.Y + 100f);
            }
            else
            {
                m_bossTitle1.Position = new Vector2(camera.X - 550f, camera.Y + 50f);
            }
            m_bossTitle2.X         = m_bossTitle1.X - 0f;
            m_bossTitle2.Y         = m_bossTitle1.Y + 50f;
            m_bossDivider.Position = m_bossTitle1.Position;
            m_bossDivider.Y       += m_bossTitle1.Height - 5;
            m_bossTitle1.X        -= 1000f;
            m_bossTitle2.X        += 1500f;
            Tween.To(m_bossDivider, 0.5f, Tween.EaseNone, "delay", "0.3", "Opacity", "1");
            Tween.To(m_bossDivider, 1f, Quad.EaseInOut, "delay", "0", "ScaleX",
                     ((float)(m_bossTitle2.Width / 5)).ToString());
            Tween.To(m_bossTitle1, 0.5f, Tween.EaseNone, "delay", "0.3", "Opacity", "1");
            Tween.To(m_bossTitle2, 0.5f, Tween.EaseNone, "delay", "0.3", "Opacity", "1");
            Tween.By(m_bossTitle1, 1f, Quad.EaseOut, "X", "1000");
            Tween.By(m_bossTitle2, 1f, Quad.EaseOut, "X", "-1500");
            m_bossTitle1.X += 1000f;
            m_bossTitle2.X -= 1500f;
            Tween.By(m_bossTitle1, 2f, Tween.EaseNone, "delay", "1", "X", "20");
            Tween.By(m_bossTitle2, 2f, Tween.EaseNone, "delay", "1", "X", "-20");
            m_bossTitle1.X -= 1000f;
            m_bossTitle2.X += 1500f;
            Tween.AddEndHandlerToLastTween(this, endHandler);
            Tween.RunFunction(3f, typeof(SoundManager), "PlaySound", "Boss_Title_Exit");
            m_bossTitle1.X      += 1020f;
            m_bossTitle2.X      -= 1520f;
            m_bossTitle1.Opacity = 1f;
            m_bossTitle2.Opacity = 1f;
            Tween.To(m_bossTitle1, 0.5f, Tween.EaseNone, "delay", "3", "Opacity", "0");
            Tween.To(m_bossTitle2, 0.5f, Tween.EaseNone, "delay", "3", "Opacity", "0");
            Tween.By(m_bossTitle1, 0.6f, Quad.EaseIn, "delay", "3", "X", "1500");
            Tween.By(m_bossTitle2, 0.6f, Quad.EaseIn, "delay", "3", "X", "-1000");
            m_bossTitle1.Opacity  = 0f;
            m_bossTitle2.Opacity  = 0f;
            m_bossDivider.Opacity = 1f;
            Tween.To(m_bossDivider, 0.5f, Tween.EaseNone, "delay", "2.8", "Opacity", "0");
            m_bossDivider.Opacity = 0f;
        }
예제 #21
0
 public void StartWipeTransition()
 {
     m_isWipeTransitioning        = true;
     m_blackTransitionIn.Visible  = true;
     m_blackScreen.Visible        = true;
     m_blackTransitionOut.Visible = true;
     m_blackTransitionIn.X        = 0f;
     m_blackTransitionOut.Y       = -500f;
     m_blackTransitionIn.X        = 1320 - m_blackTransitionIn.Bounds.Left;
     m_blackScreen.X        = m_blackTransitionIn.X;
     m_blackTransitionOut.X = m_blackScreen.X + m_blackScreen.Width;
     Tween.By(m_blackTransitionIn, 0.15f, Quad.EaseInOut, "X", (-m_blackTransitionIn.X).ToString());
     Tween.By(m_blackScreen, 0.15f, Quad.EaseInOut, "X", (-m_blackTransitionIn.X).ToString());
     Tween.By(m_blackTransitionOut, 0.15f, Quad.EaseInOut, "X", (-m_blackTransitionIn.X).ToString());
 }
예제 #22
0
        public void DisplayStringText(string text, Color color, Vector2 position)
        {
            var textObj = m_resourcePool.CheckOut();

            textObj.Font         = Game.JunicodeFont;
            textObj.Text         = text;
            textObj.Align        = Types.TextAlign.Centre;
            textObj.FontSize     = 14f;
            textObj.TextureColor = color;
            textObj.Position     = position;
            textObj.Visible      = true;
            Tween.By(textObj, 0.3f, Quad.EaseOut, "Y", "-60");
            Tween.To(textObj, 0.2f, Linear.EaseNone, "delay", "0.5", "Opacity", "0");
            Tween.AddEndHandlerToLastTween(this, "DestroyText", textObj);
        }
예제 #23
0
        public void DropBlobs()
        {
            var num = 1f;

            for (var i = 2; i < m_blobArray.Count; i++)
            {
                Tween.By(m_blobArray[i], 1f, Quad.EaseIn, "delay", num.ToString(), "Y", "1150");
                Tween.AddEndHandlerToLastTween(this, "GrowBlob", m_blobArray[i]);
                num += 0.5f * (m_blobArray.Count - i) / m_blobArray.Count;
            }
            Tween.RunFunction(num + 1f, m_boss1, "PlayAnimation", true);
            Tween.RunFunction(num + 1f, typeof(SoundManager), "PlaySound", "Boss_Blob_Idle_Loop");
            Tween.RunFunction(num + 1f, this, "DisplayBossTitle", "The Infinite", m_boss1.Name, "Intro2");
            Tween.RunFunction(num + 1f, typeof(SoundManager), "PlaySound", "Boss_Blob_Spawn");
        }
예제 #24
0
        public void DisplayNumberText(int amount, Color color, Vector2 position)
        {
            var textObj = m_resourcePool.CheckOut();

            textObj.Font         = Game.HerzogFont;
            textObj.Text         = amount.ToString();
            textObj.FontSize     = 18f;
            textObj.TextureColor = color;
            textObj.Align        = Types.TextAlign.Centre;
            textObj.Visible      = true;
            textObj.Position     = position;
            textObj.Y           -= textObj.Height / 2f;
            Tween.By(textObj, 0.3f, Quad.EaseOut, "Y", "-60");
            Tween.To(textObj, 0.2f, Linear.EaseNone, "delay", "0.5", "Opacity", "0");
            Tween.AddEndHandlerToLastTween(this, "DestroyText", textObj);
        }
예제 #25
0
 public void CreateLog()
 {
     m_log.Position   = Position;
     m_smoke.Position = Position;
     m_smoke.Visible  = true;
     m_log.Visible    = true;
     m_log.Opacity    = 1f;
     m_smoke.PlayAnimation(false);
     Tween.By(m_log, 0.1f, Linear.EaseNone, "delay", "0.2", "Y", "10");
     Tween.To(m_log, 0.2f, Linear.EaseNone, "delay", "0.3", "Opacity", "0");
     SoundManager.Play3DSound(this, m_target, "Ninja_Teleport");
     Visible      = false;
     IsCollidable = false;
     IsWeighted   = false;
     m_storedRoom = m_levelScreen.CurrentRoom;
 }
예제 #26
0
            public static void PlayerDeflect(ProjectileObj proj, bool hitPlayer)
            {
                if (hitPlayer)
                {
                    Tween.By(proj, 0.3f, Linear.EaseNone, "X", CDGMath.RandomInt(-50, 50).ToString(), "Y", CDGMath.RandomInt(-100, -50).ToString(), "Rotation", "270");
                    Tween.To(proj, 0.3f, Linear.EaseNone, "Opacity", "0");
                }
                else
                {
                    proj.IsWeighted   = false;
                    proj.IsCollidable = false;
                    Tween.To(proj, 0.3f, Linear.EaseNone, "delay", "0.3", "Opacity", "0");
                }

                Tween.AddEndHandlerToLastTween(proj, "KillProjectile");
            }
예제 #27
0
 public override void OnEnter()
 {
     SoundManager.StopMusic(0.5f);
     Player.LockControls();
     m_boss.Opacity = 0f;
     Player.AttachedLevel.UpdateCamera();
     m_bossShadow.Position = new Vector2(Bounds.Left + 100, Bounds.Top + 400);
     Player.AttachedLevel.CameraLockedToPlayer = false;
     Player.AttachedLevel.RunCinematicBorders(11f);
     Tween.To(Player.AttachedLevel.Camera, 1f, Quad.EaseInOut, "X", (Bounds.Left + 900).ToString(), "Y",
              (Bounds.Top + 400).ToString());
     Tween.By(m_bossShadow, 0.5f, Tween.EaseNone, "delay", "1", "X", "3000");
     Tween.RunFunction(1.8f, this, "Intro2");
     Tween.RunFunction(0.5f, typeof(SoundManager), "PlaySound", "Boss_Flameskull_Whoosh_01");
     base.OnEnter();
 }
예제 #28
0
        public override void OnEnter()
        {
            SoundManager.PlaySound("DialogOpen");
            m_inputDelay = 0.5f;
            m_entryRow   = 1;
            m_entryIndex = 0;
            UpdateSelection();
            m_unlockedEntries = Game.PlayerStats.DiaryEntry;
            if (m_unlockedEntries >= 24)
            {
                GameUtil.UnlockAchievement("LOVE_OF_BOOKS");
            }
            for (var i = 0; i < m_diaryList.Count; i++)
            {
                if (i < m_unlockedEntries)
                {
                    m_diaryList[i].Visible = true;
                }
                else
                {
                    m_diaryList[i].Visible = false;
                }
            }
            BackBufferOpacity = 0f;
            Tween.To(this, 0.2f, Tween.EaseNone, "BackBufferOpacity", "0.7");
            m_titleText.Opacity = 0f;
            Tween.To(m_titleText, 0.25f, Tween.EaseNone, "Opacity", "1");
            var num  = 0;
            var num2 = 0f;

            foreach (var current in m_diaryList)
            {
                if (current.Visible)
                {
                    current.Opacity = 0f;
                    if (num >= 5)
                    {
                        num   = 0;
                        num2 += 0.05f;
                    }
                    num++;
                    Tween.To(current, 0.25f, Tween.EaseNone, "delay", num2.ToString(), "Opacity", "1");
                    Tween.By(current, 0.25f, Quad.EaseOut, "delay", num2.ToString(), "Y", "50");
                }
            }
            base.OnEnter();
        }
예제 #29
0
        public void BeginGame()
        {
            Player.AttachedLevel.ProjectileManager.DestroyAllProjectiles(true);
            Player.StopAllSpells();
            m_gateClosed = false;
            Tween.By(m_gate, 0.5f, Quad.EaseInOut, "Y", (-m_gate.Height).ToString());
            m_isPlayingGame = true;
            EquipPlayer();
            var num = 0f;

            foreach (var current in m_targetList)
            {
                current.Visible = true;
                Tween.To(current, 0.5f, Tween.EaseNone, "delay", num.ToString(), "Opacity", "1");
                num += 0.01f;
            }
        }
예제 #30
0
 public override void OnEnter()
 {
     m_initialCameraPos = Camera.Position;
     SetObjectKilledPlayerText();
     m_playerFrame.Opacity  = 0f;
     m_playerFrame.Position = m_lastBoss.Position;
     m_playerFrame.SetTraits(Vector2.Zero);
     m_playerFrame.IsFemale = false;
     m_playerFrame.Class    = 0;
     m_playerFrame.Y       -= 120f;
     m_playerFrame.SetPortrait(8, 1, 1);
     m_playerFrame.UpdateData();
     Tween.To(m_playerFrame, 1f, Tween.EaseNone, "delay", "4", "Opacity", "1");
     SoundManager.StopMusic(0.5f);
     m_lockControls = false;
     SoundManager.PlaySound("Player_Death_FadeToBlack");
     m_continueText.Text     = "Press [Input:" + 0 + "] to move on";
     m_lastBoss.Visible      = true;
     m_lastBoss.Opacity      = 1f;
     m_continueText.Opacity  = 0f;
     m_dialoguePlate.Opacity = 0f;
     m_playerGhost.Opacity   = 0f;
     m_spotlight.Opacity     = 0f;
     m_playerGhost.Position  = new Vector2(m_lastBoss.X - m_playerGhost.Width / 2, m_lastBoss.Bounds.Top - 20);
     Tween.RunFunction(3f, typeof(SoundManager), "PlaySound", "Player_Ghost");
     Tween.To(m_playerGhost, 0.5f, Linear.EaseNone, "delay", "3", "Opacity", "0.4");
     Tween.By(m_playerGhost, 2f, Linear.EaseNone, "delay", "3", "Y", "-150");
     m_playerGhost.Opacity = 0.4f;
     Tween.To(m_playerGhost, 0.5f, Linear.EaseNone, "delay", "4", "Opacity", "0");
     m_playerGhost.Opacity = 0f;
     m_playerGhost.PlayAnimation();
     Tween.To(this, 0.5f, Linear.EaseNone, "BackBufferOpacity", "1");
     Tween.To(m_spotlight, 0.1f, Linear.EaseNone, "delay", "1", "Opacity", "1");
     Tween.AddEndHandlerToLastTween(typeof(SoundManager), "PlaySound", "Player_Death_Spotlight");
     Tween.RunFunction(2f, typeof(SoundManager), "PlaySound", "FinalBoss_St1_DeathGrunt");
     Tween.RunFunction(1.2f, typeof(SoundManager), "PlayMusic", "GameOverBossStinger", false, 0.5f);
     Tween.To(Camera, 1f, Quad.EaseInOut, "X", m_lastBoss.AbsX.ToString(), "Y",
              (m_lastBoss.Bounds.Bottom - 10).ToString());
     Tween.RunFunction(2f, m_lastBoss, "PlayAnimation", false);
     (m_dialoguePlate.GetChildAt(2) as TextObj).Text = "The sun... I had forgotten how it feels...";
     (m_dialoguePlate.GetChildAt(3) as TextObj).Text = "-" + m_lastBoss.Name + "'s Parting Words";
     Tween.To(m_dialoguePlate, 0.5f, Tween.EaseNone, "delay", "2", "Opacity", "1");
     Tween.RunFunction(4f, this, "DropStats");
     Tween.To(m_continueText, 0.4f, Linear.EaseNone, "delay", "4", "Opacity", "1");
     base.OnEnter();
 }