mirror of
https://github.com/ApfelTeeSaft/Slender.git
synced 2026-09-03 12:03:28 +00:00
Complete Upgrade
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[Serializable]
|
||||
public class FollowTransform : MonoBehaviour
|
||||
{
|
||||
public Transform targetTransform;
|
||||
|
||||
public bool faceForward;
|
||||
|
||||
private Transform thisTransform;
|
||||
|
||||
public virtual void Start()
|
||||
{
|
||||
thisTransform = transform;
|
||||
}
|
||||
|
||||
public virtual void Update()
|
||||
{
|
||||
thisTransform.position = targetTransform.position;
|
||||
if (faceForward)
|
||||
{
|
||||
thisTransform.forward = targetTransform.forward;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Main()
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user