Browse Source

more bug fixes

master
KG 7 years ago
parent
commit
e3641a6ab7
7 changed files with 17 additions and 4 deletions
  1. +0
    -2
      IronToad_UnityProject/Assets/Scripts/AlertController.cs
  2. +5
    -0
      IronToad_UnityProject/Assets/Scripts/AudioController.cs
  3. +1
    -0
      IronToad_UnityProject/Assets/Scripts/LightBeam.cs
  4. +2
    -0
      IronToad_UnityProject/Assets/Scripts/LighthouseLanding.cs
  5. +3
    -2
      IronToad_UnityProject/Assets/Scripts/Searchlight.cs
  6. +6
    -0
      IronToad_UnityProject/Assets/Scripts/VictoryScript.cs
  7. BIN
      IronToad_UnityProject/Assets/_Scenes/IGDA_Lighthouse.unity

+ 0
- 2
IronToad_UnityProject/Assets/Scripts/AlertController.cs View File

@ -17,14 +17,12 @@ public class AlertController : MonoBehaviour
NotificationServer.register("spotted boat", spottedBoat);
NotificationServer.register("lost boat", lostBoat);
NotificationServer.register("restart scene", restartScene);
// originalPos = text.rectTransform.anchoredPosition3D;
}
public void spottedBoat()
{
LeanTween.cancel(text.gameObject, false);
LeanTween.cancel(slider.gameObject, false);
// lastSpotted = Time.timeSinceLevelLoad;
NotificationServer.notify("show AlertText");
text.text = "hide!";
setTimer(0f);

+ 5
- 0
IronToad_UnityProject/Assets/Scripts/AudioController.cs View File

@ -27,6 +27,7 @@ public class AudioController : MonoBehaviour
NotificationServer.register("fade amb", fadeAmb);
NotificationServer.register("statechange Searchlight", searchlightStateChanged);
NotificationServer.register("restart scene", restartScene);
}
void Start()
@ -75,6 +76,10 @@ public class AudioController : MonoBehaviour
}
}
public void restartScene()
{
searchState = Searchlight.SearchState.Spline;
}
public void playAmb(object audioNameObj)
{

+ 1
- 0
IronToad_UnityProject/Assets/Scripts/LightBeam.cs View File

@ -31,6 +31,7 @@ public class LightBeam : MonoBehaviour {
}
private void resetState() {
searchState = Searchlight.SearchState.Spline;
lightBeam.gameObject.SetActive(true);
target.gameObject.SetActive(true);
GetComponent<Animator>().SetBool("isSeen", false);

+ 2
- 0
IronToad_UnityProject/Assets/Scripts/LighthouseLanding.cs View File

@ -77,6 +77,8 @@ public class LighthouseLanding : MonoBehaviour
public void restartScene()
{
searchState = Searchlight.SearchState.Spline;
switchedOff = false;
isTriggering = false;
}
}

+ 3
- 2
IronToad_UnityProject/Assets/Scripts/Searchlight.cs View File

@ -32,7 +32,7 @@ public class Searchlight : MonoBehaviour
{
foreach (Searchlight sl in instants)
{
if (sl.isTriggering)
if (sl.isActiveAndEnabled && sl.isTriggering)
return true;
}
return false;
@ -43,9 +43,9 @@ public class Searchlight : MonoBehaviour
NotificationServer.register("statechange Searchlight safe", stateSafe);
NotificationServer.register("statechange Searchlight returning", stateReturning);
NotificationServer.register("spotted boat", spottedBoat);
NotificationServer.register("restart scene", stateSafe);
if (!instants.Contains(this))
instants.Add(this);
}
void OnTriggerEnter(Collider other)
@ -80,6 +80,7 @@ public class Searchlight : MonoBehaviour
public void stateSafe()
{
state = SearchState.Spline;
isTriggering = false;
LeanTween.cancel(chaseID, false);
}

+ 6
- 0
IronToad_UnityProject/Assets/Scripts/VictoryScript.cs View File

@ -17,6 +17,7 @@ public class VictoryScript : MonoBehaviour
isTriggering = true;
NotificationServer.notify("show VictoryButton");
NotificationServer.register("restart scene", restartScene);
}
void OnTriggerExit(Collider other)
@ -48,4 +49,9 @@ public class VictoryScript : MonoBehaviour
NotificationServer.notify("show VictoryPanel");
NotificationServer.notify("hide GameUI");
}
public void restartScene()
{
isTriggering = false;
}
}

BIN
IronToad_UnityProject/Assets/_Scenes/IGDA_Lighthouse.unity View File


Loading…
Cancel
Save