备份CatanBuilding瘦身独立工程

This commit is contained in:
JSD\13999
2026-05-26 16:15:54 +08:00
commit 2d0e6a61b7
12001 changed files with 2431925 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
using DG.Tweening;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EventWashingGestureFollow : MonoBehaviour
{
[SerializeField] public float displayTime = 0f;
private float remainingTime;
public void SetFollowPosition(Vector3 position, float speed)
{
float distance = Vector3.Distance(this.gameObject.transform.position, position);
float time = distance / speed;
this.gameObject.transform.DOKill();
this.gameObject.transform.DOMove(position, time).SetEase(Ease.Linear);
remainingTime = displayTime;
if (this.gameObject.activeSelf == false) this.gameObject.SetActive(true);
}
// Update is called once per frame
void Update()
{
if (remainingTime > 0)
{
remainingTime -= Time.deltaTime;
if (remainingTime <= 0f)
{
this.gameObject.SetActive(false);
}
}
}
}