刚体与力、碰撞体与触发器、Canvas、同方向自转
1.Player - PlayerControler.cs
using UnityEngine;
// Include the namespace required to use Unity UI
using UnityEngine.UI;
using System.Collections;
public class PlayerController : MonoBehaviour {
// Create public variables for player speed, and for the Text UI game objects
public float speed;
public Text countText;
public Text winText;
// Create private references to the rigidbody component on the player, and the count of pick up objects picked up so far
private Rigidbody rb;
private int count;
// At the start of the game..
void Start ()
{
// Assign the Rigidbody component to our private rb variable
rb = GetComponent<Rigidbody>();
// Set the count to zero
count = 0;
// Run the SetCountT