amazing import spam
This commit is contained in:
parent
655a116647
commit
3160bff7a3
1016 changed files with 801 additions and 51 deletions
22
Assets/Plugins/DamageNumbersPro/Demo/Scripts/DNP_UIMove.cs
Normal file
22
Assets/Plugins/DamageNumbersPro/Demo/Scripts/DNP_UIMove.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class DNP_UIMove : MonoBehaviour
|
||||
{
|
||||
public Vector2 fromPosition;
|
||||
public Vector2 toPosition;
|
||||
public float frequency = 4f;
|
||||
|
||||
RectTransform rectTransform;
|
||||
|
||||
void Start()
|
||||
{
|
||||
rectTransform = GetComponent<RectTransform>();
|
||||
}
|
||||
|
||||
void FixedUpdate()
|
||||
{
|
||||
rectTransform.anchoredPosition = Vector2.Lerp(fromPosition, toPosition, Mathf.Sin(Time.time * frequency) * 0.5f + 0.5f);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue