Skip to content

Commit

Permalink
This is the actually submitted version.
Browse files Browse the repository at this point in the history
Added rock rearrangement at new level.
  • Loading branch information
LanceJZ committed Jan 14, 2018
1 parent de2249e commit 682eb6c
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CFNGamejam2/CFNGamejam2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<AssemblyFileVersionSettings>MMddStamp.DayOfYearStamp.MonthStamp.TimeStamp</AssemblyFileVersionSettings>
<AssemblyInfoVersionSettings>YearStamp.DateStamp.DeltaDayStamp.Increment</AssemblyInfoVersionSettings>
<PrimaryVersionType>AssemblyVersionAttribute</PrimaryVersionType>
<AssemblyVersion>1.764.14.0101</AssemblyVersion>
<AssemblyVersion>1.765.14.0101</AssemblyVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
Expand Down
44 changes: 35 additions & 9 deletions CFNGamejam2/Entities/Ground.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,29 +131,25 @@ public void BeginRun()
{
ExtraLargeRocks.Add(new Rock(Game, RefGameLogic));
ExtraLargeRocks.Last().SetModel(ExtraLargeRockModel);
SpawnExtraLargeRock(ExtraLargeRocks.Last());
//SpawnExtraLargeRock(ExtraLargeRocks.Last());
}

for (int i = 0; i < 30; i++)
{
LargeRocks.Add(new Rock(Game, RefGameLogic));
LargeRocks.Last().SetModel(LargeRockModel);
SpawnLargeRock(LargeRocks.Last());
//SpawnLargeRock(LargeRocks.Last());

MedRocks.Add(new Rock(Game, RefGameLogic));
MedRocks.Last().SetModel(MedRockModel);
SpawnMedRock(MedRocks.Last());
//SpawnMedRock(MedRocks.Last());

SmallRocks.Add(new Rock(Game, RefGameLogic));
SmallRocks.Last().SetModel(SmallRockModel);
SpawnSmallRock(SmallRocks.Last());
//SpawnSmallRock(SmallRocks.Last());
}

Vector3[] path = new Vector3[2];
path[0] = new Vector3(0, -11, -Border);
path[1] = new Vector3(0, -11, Border);

ClearPath(path);
ResetRocks();
}

public override void Update(GameTime gameTime)
Expand Down Expand Up @@ -216,6 +212,36 @@ public void ClearPath(Vector3[] path)
}
}

public void ResetRocks()
{
foreach (Rock rock in ExtraLargeRocks)
{
SpawnExtraLargeRock(rock);
}

foreach (Rock rock in LargeRocks)
{
SpawnLargeRock(rock);
}

foreach (Rock rock in MedRocks)
{
SpawnMedRock(rock);
}

foreach (Rock rock in SmallRocks)
{
SpawnSmallRock(rock);
}


Vector3[] path = new Vector3[2];
path[0] = new Vector3(0, -11, -Border);
path[1] = new Vector3(0, -11, Border);

ClearPath(path);
}

bool MoveTowardsPoint(Vector3 goal)
{
if (Position == goal)
Expand Down
1 change: 1 addition & 0 deletions CFNGamejam2/GameLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public void SwitchToMainMenu()

public void NewWave()
{
RefGround.ResetRocks();
RefEnemy.NewWave();
}

Expand Down
4 changes: 2 additions & 2 deletions CFNGamejam2/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.764.14.0101")]
[assembly: AssemblyFileVersion("0114.14.1.0613")]
[assembly: AssemblyVersion("1.765.14.0101")]
[assembly: AssemblyFileVersion("0114.14.1.1850")]

0 comments on commit 682eb6c

Please sign in to comment.