|
|
@ -43,7 +43,7 @@ public class Catapult : MonoBehaviour |
|
|
|
|
|
|
|
NotificationServer.register("statechange Searchlight", searchlightStateChanged); |
|
|
|
NotificationServer.register("BoulderHit", boulderHit); |
|
|
|
NotificationServer.register("restart scene", boulderHit); |
|
|
|
NotificationServer.register("restart scene", restartScene); |
|
|
|
} |
|
|
|
|
|
|
|
void Update() |
|
|
@ -61,8 +61,16 @@ public class Catapult : MonoBehaviour |
|
|
|
launchBoulder(); |
|
|
|
} |
|
|
|
|
|
|
|
public void boulderHit() |
|
|
|
public void boulderHit(object boulderObj) |
|
|
|
{ |
|
|
|
GameObject go = boulderObj as GameObject; |
|
|
|
if (go == splineObjectTranslate.ObjectToManipulate.gameObject) |
|
|
|
LeanTween.cancel(splineObjectTranslate.ObjectToManipulate.gameObject, true); |
|
|
|
} |
|
|
|
|
|
|
|
public void restartScene() |
|
|
|
{ |
|
|
|
searchState = Searchlight.SearchState.Spline; |
|
|
|
LeanTween.cancel(splineObjectTranslate.ObjectToManipulate.gameObject, true); |
|
|
|
} |
|
|
|
|
|
|
|