Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jpecoraro342
committed
Feb 25, 2016
1 parent
a0e6ba2
commit f590f18
Showing
5 changed files
with
128 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
using UnityEngine; | ||
using System.Collections; | ||
|
||
public class AirplaneStartReset : MonoBehaviour { | ||
|
||
public GameObject planeLaunchingPoint; | ||
public GameObject plane; | ||
|
||
public GameObject planeCamera; | ||
|
||
// TODO: Get all the objects | ||
|
||
// Use this for initialization | ||
void Start () { | ||
|
||
} | ||
|
||
// Update is called once per frame | ||
void Update () { | ||
|
||
} | ||
|
||
public void resetAirplane() { | ||
StartCoroutine(resetRigidBody()); | ||
startPlaneSequence(); | ||
} | ||
|
||
void startPlaneSequence() { | ||
// TODO: | ||
// Freeze Rotation of Plane? | ||
} | ||
|
||
public void enablePlaneMovement() { | ||
// Turn gravity on | ||
// unfreeze some parts of rigidbody? | ||
// enable plane movement script | ||
} | ||
|
||
void disablePlaneMovement() { | ||
// Turn off gravity | ||
// Freeze Rigid Body | ||
// disable plane movement script | ||
} | ||
|
||
public void enablePitchMovement() { | ||
// turn on pitch script | ||
} | ||
|
||
public void enableYawMovement() { | ||
// turn on rudder script | ||
} | ||
|
||
public void enableRollMovement() { | ||
// turn on roll script | ||
} | ||
|
||
public void disablePitchMovement() { | ||
// turn on pitch script | ||
} | ||
|
||
public void disableYawMovement() { | ||
// turn on rudder script | ||
} | ||
|
||
public void disableRollMovement() { | ||
// turn on roll script | ||
} | ||
|
||
public void turnEngineOn() { | ||
|
||
} | ||
|
||
public void turnEngineOff() { | ||
|
||
} | ||
|
||
IEnumerator resetRigidBody(GameObject gobject) { | ||
gobject.transform.localPosition = Vector3.zero; | ||
|
||
var rigidbody = gobject.GetComponent<Rigidbody>(); | ||
|
||
rigidbody.velocity = Vector3.zero; | ||
rigidbody.angularVelocity = Vector3.zero; | ||
|
||
rigidbody.Sleep(); | ||
|
||
yield return new WaitForSeconds(1.0f); | ||
|
||
rigidbody.WakeUp(); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
WrightFlyerTour/Assets/_Scripts/AirplaneStartReset.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.