Code refactor

This commit is contained in:
AbstractConcept 2022-10-31 19:58:41 -05:00
parent e14a12f2ab
commit af4dab5546
278 changed files with 468 additions and 668 deletions

View file

@ -0,0 +1,24 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace RimWorldAnimationStudio
{
public class Chaser : MonoBehaviour
{
public GameObject target;
public bool chaseAlongX = true;
public bool chaseAlongY = false;
void Update()
{
if (target == null)
{ return; }
float x = chaseAlongX ? target.transform.position.x : transform.position.x;
float y = chaseAlongY ? target.transform.position.y : transform.position.y;
transform.position = new Vector3(x, y, 0f);
}
}
}