Sagittaeri 7 years ago
parent
commit
8e765c0bef
6 changed files with 42 additions and 1 deletions
  1. +6
    -0
      IronToad_UnityProject/Assets/Scripts/LightBeam.cs
  2. +2
    -1
      IronToad_UnityProject/Assets/Scripts/LighthouseLanding.cs
  3. +11
    -0
      IronToad_UnityProject/Assets/Scripts/PlayerController.cs
  4. +9
    -0
      IronToad_UnityProject/Assets/Sound.meta~HEAD_0
  5. +7
    -0
      IronToad_UnityProject/Assets/Sound/Music.meta
  6. +7
    -0
      IronToad_UnityProject/Assets/Sound/SFX.meta

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

@ -10,6 +10,7 @@ public class LightBeam : MonoBehaviour {
// Use this for initialization
void Start () {
NotificationServer.register("statechange Searchlight", toggleState);
NotificationServer.register("switch off", switchOff);
}
// Update is called once per frame
@ -26,4 +27,9 @@ public class LightBeam : MonoBehaviour {
private void toggleState() {
GetComponent<Animator>().SetBool("isSeen", (Searchlight.state == Searchlight.SearchState.Chasing));
}
private void switchOff() {
lightBeam.gameObject.SetActive(false);
target.gameObject.SetActive(false);
}
}

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

@ -57,5 +57,6 @@ public class LighthouseLanding : MonoBehaviour
switchedOff = true;
NotificationServer.notify("hide TakeoverButton");
NotificationServer.notify("play sfx", "assassination");
}
NotificationServer.notify("switch off");
}
}

+ 11
- 0
IronToad_UnityProject/Assets/Scripts/PlayerController.cs View File

@ -19,12 +19,17 @@ public class PlayerController : MonoBehaviour {
public GameObject[] lifeHearts;
private Vector3 startPoint;
public GameObject boat;
void Start() {
NotificationServer.register("show GameUI", showGameUI);
NotificationServer.register("hide GameUI", hideGameUI);
instance = this;
startPoint = boat.transform.position;
}
@ -83,4 +88,10 @@ public class PlayerController : MonoBehaviour {
isLocked = true;
}
public void restartScene() {
setLife(3);
boat.transform.position = startPoint;
boat.GetComponent<Rigidbody>().velocity = Vector3.zero;
}
}

+ 9
- 0
IronToad_UnityProject/Assets/Sound.meta~HEAD_0 View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: e3b0c439ea6f28c4fb3ce6bc58682b6b
folderAsset: yes
timeCreated: 1485052873
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

+ 7
- 0
IronToad_UnityProject/Assets/Sound/Music.meta View File

@ -1,8 +1,15 @@
fileFormatVersion: 2
<<<<<<< HEAD
guid: f58a00a3100922d4288203443c54d1a5
folderAsset: yes
timeCreated: 1485052873
licenseType: Pro
=======
guid: be2c14b0c562c483bbe057367939b479
folderAsset: yes
timeCreated: 1485052376
licenseType: Free
>>>>>>> 497ca195525b3f1160bab1491e71a9a013e118fb
DefaultImporter:
userData:
assetBundleName:

+ 7
- 0
IronToad_UnityProject/Assets/Sound/SFX.meta View File

@ -1,8 +1,15 @@
fileFormatVersion: 2
<<<<<<< HEAD
guid: d96f9b1229b84cb41b71f2332674b8e1
folderAsset: yes
timeCreated: 1485052873
licenseType: Pro
=======
guid: bb5698073b8d847298f0287fcfbdd0de
folderAsset: yes
timeCreated: 1485052376
licenseType: Free
>>>>>>> 497ca195525b3f1160bab1491e71a9a013e118fb
DefaultImporter:
userData:
assetBundleName:

Loading…
Cancel
Save