[Add] Low-Poly Medieval Fantasy Heroes - Basic Pack
https://assetstore.unity.com/packages/3d/characters/humanoids/fantasy/low-poly-medieval-fantasy-heroes-basic-pack-288957
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Generic_SimpleRotate : MonoBehaviour
|
||||
{
|
||||
|
||||
public bool rotX;
|
||||
public float rotXSpeed = 50f;
|
||||
public bool rotY;
|
||||
public float rotYSpeed = 50f;
|
||||
public bool rotZ;
|
||||
public float rotZSpeed = 50f;
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (rotX == true)
|
||||
{
|
||||
transform.Rotate(Vector3.left * Time.deltaTime * rotXSpeed);
|
||||
}
|
||||
if (rotY == true)
|
||||
{
|
||||
transform.Rotate(Vector3.up * Time.deltaTime * rotYSpeed);
|
||||
}
|
||||
|
||||
if (rotZ == true)
|
||||
{
|
||||
transform.Rotate(Vector3.back * Time.deltaTime * rotZSpeed);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user