[External] Synty Polygon 외부 에셋 패키지 추가
Ultraworked with [Sisyphus](https://github.com/code-yeonggu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
31
Assets/External/PolygonGeneric/Scripts/Generic_SimpleTranslate.cs
vendored
Normal file
31
Assets/External/PolygonGeneric/Scripts/Generic_SimpleTranslate.cs
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Generic_SimpleTranslate : MonoBehaviour
|
||||
{
|
||||
public bool moveX;
|
||||
public float moveXSpeed = 2f;
|
||||
public bool moveY;
|
||||
public float moveYSpeed = 2f;
|
||||
public bool moveZ;
|
||||
public float moveZSpeed = 2f;
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (moveX == true)
|
||||
{
|
||||
transform.Translate(Vector3.left * Time.deltaTime * moveXSpeed);
|
||||
}
|
||||
if (moveY == true)
|
||||
{
|
||||
transform.Translate(Vector3.up * Time.deltaTime * moveYSpeed);
|
||||
}
|
||||
|
||||
if (moveZ == true)
|
||||
{
|
||||
transform.Translate(Vector3.back * Time.deltaTime * moveZSpeed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user