Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Added generator speedup based on scores(currently it gives a speedup …
…signal at 70% victory score) Gotta get some shuteye, I will add music tonight with the help of john, and will help finish the final scene and add the skybox swap(just one line) as well.
- Loading branch information
Tianzhu Zhang
authored and
Tianzhu Zhang
committed
Oct 9, 2013
1 parent
d2a26a2
commit d093d85
Showing
8 changed files
with
221 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using UnityEngine; | ||
using System.Collections; | ||
|
||
public class MasterControl : MonoBehaviour | ||
{ | ||
private FPS_HERO hero; | ||
private GameObject[] eGen; | ||
|
||
public int Win_Cond = 40; | ||
public int Lose_Cond = 0; | ||
private bool neverdone = true; | ||
|
||
// Use this for initialization | ||
void Start () | ||
{ | ||
hero = (FPS_HERO)FindObjectOfType(typeof(FPS_HERO)); | ||
eGen = GameObject.FindGameObjectsWithTag("Respawn"); | ||
|
||
} | ||
//*** put swap skybox somewhere here** | ||
|
||
// Update is called once per frame | ||
void Update () | ||
{ | ||
#region WinLose | ||
if(hero.Health <= Lose_Cond) | ||
Application.LoadLevel("GameOver"); | ||
if(hero.Score >= Win_Cond) | ||
Application.LoadLevel("VictoryScreen"); | ||
#endregion | ||
|
||
#region speedup | ||
if(neverdone ==true) | ||
{ | ||
if(hero.Score >= (0.7f * Win_Cond)) | ||
{ | ||
|
||
foreach(GameObject e in eGen) | ||
{ | ||
e.SendMessage("SpeedUp"); | ||
} | ||
|
||
neverdone = false; | ||
} | ||
} | ||
#endregion | ||
|
||
|
||
|
||
} | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.