Skip to content

Commit

Permalink
win message when beat final boss
Browse files Browse the repository at this point in the history
  • Loading branch information
jordannstrong committed Dec 23, 2017
1 parent dc82615 commit a79b987
Show file tree
Hide file tree
Showing 13 changed files with 160 additions and 27 deletions.
17 changes: 10 additions & 7 deletions Assets/GameManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@

public class GameManager : MonoBehaviour {

public GameObject boss1;
public GameObject boss2;
public GameObject boss3;
public bool boss1 = true;
public bool boss2 = true;
public bool boss3 = true;
public GameObject final;

// Use this for initialization
void Start () {

boss1 = true;
boss2 = true;
boss3 = true;
}

// Update is called once per frame
void Update () {
if (GameObject.Find("zippermouth_c_PF (2)") != null && GameObject.Find("spider_myOldOne (1)") != null && GameObject.Find("wolf_02") != null)
if (!(boss1 || boss2 || boss3))
{
GameObject.Find ("portal").SetActive (true);
final.SetActive (true);
}
}
}
Binary file modified Assets/Levels/RPGterrain.unity
Binary file not shown.
3 changes: 0 additions & 3 deletions Assets/Scripts/Fighter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ public class Fighter : MonoBehaviour {
public float escapeTime = 10;
public float countDown;

void Awake() {
DontDestroyOnLoad (this.gameObject);
}

// Use this for initialization
void Start ()
Expand Down
36 changes: 19 additions & 17 deletions Assets/Scripts/mob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class mob : MonoBehaviour {
private bool impacted = false;
private Fighter opponent;
private int stunTime;
public GameObject gt;

// Use this for initialization
void Start ()
Expand All @@ -32,28 +33,29 @@ void Start ()
// Update is called once per frame
void FixedUpdate ()
{
if (IsDead() == false)
{
if(!inRange(chaseRange)) return;
if(stunTime<=0)
{
if (!inRange (range))
{
if (IsDead () == false) {
if (!inRange (chaseRange))
return;
if (stunTime <= 0) {
if (!inRange (range)) {
chase ();
} else {
} else {
//animation.CrossFade (idel.name);
attack();
if (GetComponent<Animation>()[attacks.name].time > 0.9*GetComponent<Animation>()[attacks.name].length)
{
impacted = false;
attack ();
if (GetComponent<Animation> () [attacks.name].time > 0.9 * GetComponent<Animation> () [attacks.name].length) {
impacted = false;
}
}
} else {
}
}
else
{
} else {
staydead ();

if (this.gameObject.name == "Boss") {
gt.SetActive (true);
Time.timeScale = 0;
}
} else
staydead ();
}
}

public void GetStun(int seconds)
Expand Down
20 changes: 20 additions & 0 deletions Assets/boss1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class boss1 : MonoBehaviour {
public GameManager gm;
// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {

}

void onDestroy() {
gm.boss1 = false;
}
}
12 changes: 12 additions & 0 deletions Assets/boss1.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions Assets/boss2.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class boss2 : MonoBehaviour {
public GameManager gm;
// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {

}

void onDestroy() {
gm.boss2 = false;
}
}
12 changes: 12 additions & 0 deletions Assets/boss2.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions Assets/boss3.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class boss3 : MonoBehaviour {
public GameManager gm;
// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {

}

void onDestroy() {
gm.boss3 = false;
}
}
12 changes: 12 additions & 0 deletions Assets/boss3.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions Assets/onDeath.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class onDeath : MonoBehaviour {

public GameObject gt;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {

}

void onDestroy()
{
gt.SetActive (true);
}
}
12 changes: 12 additions & 0 deletions Assets/onDeath.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified ProjectSettings/QualitySettings.asset
Binary file not shown.

0 comments on commit a79b987

Please sign in to comment.