Files
UltimateFishing2020/Assets/Scripts/Assembly-CSharp/Demo_Animator_WolfMale.cs
2026-03-04 10:03:45 +08:00

50 lines
661 B
C#

using UnityEngine;
public class Demo_Animator_WolfMale : MonoBehaviour
{
private Animator anim;
private int i;
public int size = 10;
public bool rot;
private Vector3 startpose;
private void Start()
{
anim = GetComponent<Animator>();
startpose = base.transform.position;
}
private void Update()
{
if (rot)
{
base.transform.Rotate(0f, 50f * Time.deltaTime, 0f);
}
anim.SetInteger("number", i);
}
public void NextAnimation()
{
if (i > size)
{
i = 0;
}
i++;
base.transform.position = startpose;
}
public void BackAnimation()
{
i--;
if (i < 0)
{
i = size;
}
base.transform.position = startpose;
}
}