mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-14 05:35:08 +00:00
17 lines
No EOL
417 B
C#
17 lines
No EOL
417 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace RhythmHeavenMania.Common
|
|
{
|
|
public class FollowMouse : MonoBehaviour
|
|
{
|
|
public Vector2 offset;
|
|
|
|
private void Update()
|
|
{
|
|
var pos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
|
|
transform.position = new Vector3(pos.x - offset.x, pos.y - offset.y, 0);
|
|
}
|
|
}
|
|
} |