using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace MPStudio
{
    public class AutoMove : MonoBehaviour
    {
        [SerializeField] public float speed = 10f; // 移动速度

        public Vector3 dir = Vector3.up;

        void Update()
        {
            // 每帧向右移动（按速度×时间）
            transform.Translate(dir * speed * Time.deltaTime, Space.Self);
        }

        /*
        private void OnDisable()
        {
            print("隐藏");
        }
        */
    }
}