merging the n nightmare

This commit is contained in:
shakurass 2014-04-27 22:02:53 -06:00
commit 0258302243
4 changed files with 9 additions and 4 deletions

View file

@ -2489,10 +2489,10 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: cc84b14a55660b643805ae0f1878c40b, type: 3} m_Script: {fileID: 11500000, guid: cc84b14a55660b643805ae0f1878c40b, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
swigs: 10 swigs: 20
swigText: {fileID: 493161367} swigText: {fileID: 493161367}
scoreText: {fileID: 621151321} scoreText: {fileID: 621151321}
maxPatrons: 10 maxPatrons: 20
spawnWait: .5 spawnWait: .5
startWait: 1 startWait: 1
waveWait: 1 waveWait: 1

View file

@ -12,6 +12,8 @@ public class GameController : MonoBehaviour {
public float waveWait; public float waveWait;
public GameObject[] patronObjects; public GameObject[] patronObjects;
public int currentNumberOfDemons = 0;
public GUIText shankYouText; public GUIText shankYouText;
public GUIText gameOverText; public GUIText gameOverText;
public GUIText restartText; public GUIText restartText;
@ -86,6 +88,7 @@ public class GameController : MonoBehaviour {
score += 100; score += 100;
UpdateScoreText (); UpdateScoreText ();
patronCounter--; patronCounter--;
currentNumberOfDemons--;
} }
public void DetractScore() { public void DetractScore() {

View file

@ -18,8 +18,10 @@ public class Patron : MonoBehaviour {
else else
Debug.Log("Cannot find GameController script."); Debug.Log("Cannot find GameController script.");
if (Random.value > 0.6) if (Random.value > 0.6 && gameController.currentNumberOfDemons < (gameController.maxPatrons / 4)) {
isDemon = true; isDemon = true;
gameController.currentNumberOfDemons++;
}
} }
void OnTriggerEnter(Collider other) { void OnTriggerEnter(Collider other) {

View file

@ -19,7 +19,7 @@ Material:
second: second:
m_Texture: {fileID: 2800000, guid: 26c9dff0fed396341b045e42e3a0b500, type: 3} m_Texture: {fileID: 2800000, guid: 26c9dff0fed396341b045e42e3a0b500, type: 3}
m_Scale: {x: 1, y: .5} m_Scale: {x: 1, y: .5}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: .5}
data: data:
first: first:
name: _BumpMap name: _BumpMap