You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
736 B
41 lines
736 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class RemoveAnimationTransfrom : MonoBehaviour
|
|
{
|
|
float rx = 0;
|
|
float ry = 0;
|
|
float rz = 0;
|
|
float z = 0;
|
|
|
|
void LateUpdate()
|
|
{
|
|
transform.localPosition = new Vector3(0, 0, z);
|
|
transform.localRotation = Quaternion.Euler(rx, ry, rz);
|
|
}
|
|
|
|
public void xReverse()
|
|
{
|
|
rx = (rx + 90) % 360;
|
|
}
|
|
public void yReverse()
|
|
{
|
|
ry = (ry + 90) % 360;
|
|
}
|
|
public void zReverse()
|
|
{
|
|
rz = (rz + 90) % 360;
|
|
}
|
|
public void zPlus()
|
|
{
|
|
z += 0.05f;
|
|
}
|
|
public void zMinus()
|
|
{
|
|
z -= 0.05f;
|
|
}
|
|
} |