JMO Asset 추가

This commit is contained in:
BoyongHwang
2026-02-24 16:36:39 +09:00
parent 98d071480c
commit c75e2c7f3c
1015 changed files with 1126112 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2025 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
using UnityEngine;
namespace CartoonFX
{
public class CFXR_Demo_Translate : MonoBehaviour
{
public Vector3 direction = new Vector3(0,1,0);
public bool randomRotation;
bool initialized;
Vector3 initialPosition;
void Awake()
{
if (!initialized)
{
initialized = true;
initialPosition = this.transform.position;
}
}
void OnEnable()
{
this.transform.position = initialPosition;
if (randomRotation)
{
this.transform.eulerAngles = Vector3.Lerp(Vector3.zero, Vector3.up * 360, Random.value);
}
}
void Update()
{
this.transform.Translate(direction * Time.deltaTime);
}
}
}