PlayerControl

using UnityEngine; using System.Collections; public class PlayerControl : MonoBehaviour { public float setupSpinSpeed = 50.0f; public float speed = 16.0f; public float rotationSpeed = 0.60f; public float hoverPower = 3.5f; public Rigidbody projectile; public Color red = Color.red; public Color blue = Color.blue; public Color green = Color.green; public Color yellow = Color.yellow; public Color white = Color.white; private GameData gameDataRef; void Start () { gameDataRef = GameObject.Find("GameManager").GetComponent<GameData>(); } void FixedUpdate() { float foreAndAft = Input.GetAxis ("Vertical") * speed; float rotation = Input.GetAxis ("Horizontal") * rotationSpeed; rigidbody.AddRelativeForce (0, 0, foreAndAft); rigidbody.AddTorque ...

Get Learning C# by Developing Games with Unity 3D Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.