This file contains hidden or 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
| using UnityEngine; | |
| using System.Collections; | |
| public class Portals : MonoBehaviour { | |
| //in our code portals are just position aka transforms | |
| public Transform disPortal;//the current portal | |
| public Transform targetPortal;//the target portal | |
| // Use this for initialization |
This file contains hidden or 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
| using UnityEngine; | |
| using System.Collections; | |
| public class CameraTracking : MonoBehaviour { | |
| public Transform myTarget;//what object are you targetting | |
| public Vector3 camReposition;//the position camera is getting repositioned to when tracking an object | |
| public float disTarget;//how far to set camera from payer - Z displacement to control distance usally negatives is what youre looking for |
This file contains hidden or 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
| using UnityEngine; | |
| using System.Collections; | |
| public class CameraTracking : MonoBehaviour { | |
| public Transform myTarget;//what object are you targetting | |
| public Vector3 camReposition;//the position camera is getting repositioned to when tracking an object | |
| public bool isAnim;//has the object started animating mainly to get a start position for reseting animation) | |
| public Vector3 animStartPos;//star position of animation |
This file contains hidden or 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
| using UnityEngine; | |
| using System.Collections; | |
| public class Helloworld : MonoBehaviour { | |
| public float helloVar; | |
| void Start () | |
| { | |
| helloVar = 0; |
This file contains hidden or 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
| using UnityEngine; | |
| using System.Collections; | |
| public class Arrays : MonoBehaviour { | |
| public string[] myString;//[] after the type make sit an array in this case we made an array [] of type string, names myString | |
| void Start () | |
| { |
This file contains hidden or 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
| using UnityEngine; | |
| using System.Collections; | |
| public class FixedControls : MonoBehaviour { | |
| public float zSpd, xSpd,ySpd;//Speed of ship on X,Y,Z axis's | |
| public bool yAccel,zAccel,xAccel;//boolean to know if the player is actually accelerating on any axis used for slow down funtion | |
This file contains hidden or 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
| using UnityEngine; | |
| using System.Collections; | |
| public class Enemy : MonoBehaviour { | |
| public int eneID; | |
| public Player target; |
This file contains hidden or 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
| using UnityEngine; | |
| using System.Collections; | |
| public class CameraTracking : MonoBehaviour { | |
| public Transform myTarget; | |
| public Vector3 camReposition; |
This file contains hidden or 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
| using UnityEngine; | |
| using System.Collections; | |
| public class CameraTracking : MonoBehaviour { | |
| public Transform myTarget; | |
| public Vector3 camReposition; |
This file contains hidden or 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
| using UnityEngine; | |
| using System.Collections; | |
| public class PlatformControls : MonoBehaviour { | |
| //Boolean variables can be true or false you'd use this to see wheather something is happening or a variable is set. | |
| public bool isGrounded;//is my player colliding with the floor? |