Added new custom castles and slingshot band
This commit is contained in:
@@ -69,7 +69,7 @@ public class MissionDemolition: MonoBehaviour {
|
||||
// Zoom out
|
||||
SwitchView("Show Both" );
|
||||
// Start the next level in 2 seconds
|
||||
Invoke("NextLevel" ,2f );
|
||||
Invoke("NextLevel", 2f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,17 +87,17 @@ public class MissionDemolition: MonoBehaviour {
|
||||
}
|
||||
showing = eView;
|
||||
switch (showing) {
|
||||
case"Show Slingshot" :
|
||||
case "Show Slingshot":
|
||||
FollowCam.POI = null;
|
||||
uitButton.text = "Show Castle";
|
||||
break;
|
||||
|
||||
case"Show Castle":
|
||||
case "Show Castle":
|
||||
FollowCam.POI = s.castle;
|
||||
uitButton.text = "Show Both" ;
|
||||
break;
|
||||
|
||||
case"Show Both" :
|
||||
case "Show Both":
|
||||
FollowCam.POI = GameObject.Find("ViewBoth" );
|
||||
uitButton.text = "Show Slingshot";
|
||||
break;
|
||||
|
||||
@@ -67,6 +67,10 @@ public class Slingshot : MonoBehaviour
|
||||
// Move the projectile to this new position
|
||||
Vector3 projPos = launchPos + mouseDelta;
|
||||
projectile.transform.position = projPos;
|
||||
// Get SlingshotBand and match point 1 with projectile
|
||||
LineRenderer slingshotBand = s.GetComponentInChildren<LineRenderer>();
|
||||
slingshotBand.SetPosition(1, mouseDelta);
|
||||
|
||||
if (Input.GetMouseButtonUp(0)) {
|
||||
// The mouse has been released
|
||||
aimingMode = false;
|
||||
@@ -76,6 +80,7 @@ public class Slingshot : MonoBehaviour
|
||||
projectile = null;
|
||||
MissionDemolition.ShotFired();
|
||||
ProjectileLine.s.poi = projectile;
|
||||
slingshotBand.SetPosition(1, new Vector3(0,0,0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user