using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class fengshan1 : MonoBehaviour {
public int i = 500;
private int p = 2;
public GameObject cubeModel;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Vector3 center = cubeModel.transform.eulerAngles;
if (Input.GetKeyDown(KeyCode.P)) {
p ++;
}
if (p % 2 == 1)
{
transform.Rotate(0, i * Time.deltaTime, 0, Space.Self);
}
if (p % 2 == 0)
{
transform.Rotate(0,0, 0, Space.Self);
}
}
}
using System.Collections;
using System.Coll