카테고리 없음

늑대이동 & 플레이어 이동

ruripanda 2024. 8. 31. 10:50

인풋메니져 스크립트

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

public class InputManager : MonoBehaviour
{
    public WolfController wolf;
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        if(Input.GetMouseButtonDown(1))
        {
            Vector3 pos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
            wolf.MoveStart(pos);

        }
    }
}

오브젝트 연결도