1.跳一跳小人代码
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class Move : MonoBehaviour {
GameC g;
public float time1;
public float time2;
public float time3;
public float time4;
// Use this for initialization
void Start() {
g = GameObject.Find("GameController").GetComponent<GameC>();
}
// Update is called once per frame
void Update() {
//jump();
if (g.flag == false) {
jump();
} else {
jump1();
}
}
private void OnCollisionEnter(Collision other) {
if (other.transform.tag == "Cube") {
g.ShengC();
}
if (other.transform.tag == "Plane") {
SceneManager.LoadScene(0);
}
}
private void OnCollisionExit(Collision collision) {
if (collision.transform.tag == &#