Permalink
Browse files

Update Xbox version

  • Loading branch information...
1 parent a7600ea commit a06b80f9b369959e84799c422840b6d3cb3d494d @DizWARE committed May 6, 2011
@@ -77,6 +77,11 @@ public XElement SaveData
bool mWorldUnlocked = false;
int mLatestUnlocked = 0;
int mUnlockedTimer = 0;
+
+ bool mHasBeatFinal = false;
+ bool mShowCongrats = false;
+ Texture2D mLastCongrats;
+
Texture2D mUnlockedDialog;
List<LevelInfo> mLevels;
@@ -464,6 +469,12 @@ public void UpdateStarCount()
if (!this.TrialMode)
{
+ if (!mHasBeatFinal && mStarCount > 480)
+ {
+ mHasBeatFinal = true;
+ mShowCongrats = true;
+ }
+
if (mStarCount < 30)
{
if (loaded == false)
@@ -512,6 +523,7 @@ public void Load(ContentManager content)
mLoadingBG = content.Load<Texture2D>("Images/Menu/LevelSelect/LoadingMenu");
mUnlockedDialog = content.Load<Texture2D>("Images/Menu/LevelSelect/WorldUnlocked");
+ mLastCongrats = content.Load<Texture2D>("Images/Menu/LevelSelect/LastLevelCongrats");
mWorldBackground = new Texture2D[9][];
mWorldTitleBox = new Texture2D[9][];
@@ -615,6 +627,9 @@ private void HandleAKey(ref GameStates gameState, ref Level currentLevel)
{
if (mControls.isAPressed(false) || mControls.isStartPressed(false))
{
+ if (mShowCongrats)
+ { mShowCongrats = false; return; }
+
if (GameSound.volume != 0)
GameSound.menuSound_select.Play();
@@ -650,7 +665,12 @@ private void HandleAKey(ref GameStates gameState, ref Level currentLevel)
private void HandleBKey(ref GameStates gameState)
{
if (mControls.isBPressed(false) || mControls.isBackPressed(false))
+ {
+ if (mShowCongrats)
+ { mShowCongrats = false; return; }
+
Exit(ref gameState);
+ }
}
@@ -669,6 +689,9 @@ private void Exit(ref GameStates gameState)
/// </summary>
private void HandleDirectionKey()
{
+ if (mShowCongrats)
+ { return; }
+
//Down Button
if (mControls.isDownPressed(false))
{
@@ -740,6 +763,12 @@ public void Draw(SpriteBatch spriteBatch, Matrix scale)
DrawLevelPanel(spriteBatch);
DrawTitleBar(spriteBatch);
+ if (mShowCongrats)
+ {
+ mWorldUnlocked = false;
+ spriteBatch.Draw(mLastCongrats, new Vector2(mScreenRect.Center.X - mLastCongrats.Width / 2, mScreenRect.Center.Y - mLastCongrats.Height / 2), Color.White);
+ }
+
if (mWorldUnlocked && mUnlockedTimer < 45 && !TrialMode)
{
Vector2 size = mFontBig.MeasureString("New World Unlocked");
@@ -1723,6 +1723,13 @@
<Processor>TextureProcessor</Processor>
</Compile>
</ItemGroup>
+ <ItemGroup>
+ <Compile Include="Images\Menu\LevelSelect\LastLevelCongrats.png">
+ <Name>LastLevelCongrats</Name>
+ <Importer>TextureImporter</Importer>
+ <Processor>TextureProcessor</Processor>
+ </Compile>
+ </ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Binary file not shown.

0 comments on commit a06b80f

Please sign in to comment.