新增维修工具基础逻辑,重构face的结构并替换美术
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using UnityEngine;
|
||||
|
||||
public abstract class Tool : MonoBehaviour
|
||||
{
|
||||
//public string toolName;
|
||||
protected bool isFollowingMouse = false;
|
||||
public bool IsFollowingMouse => isFollowingMouse; // 只读属性
|
||||
|
||||
// 启动跟随鼠标
|
||||
public virtual void StartFollowMouse()
|
||||
{
|
||||
isFollowingMouse = true;
|
||||
}
|
||||
|
||||
// 停止跟随鼠标
|
||||
public virtual void StopFollowMouse()
|
||||
{
|
||||
isFollowingMouse = false;
|
||||
}
|
||||
|
||||
// 工具的使用行为,由子类实现
|
||||
public abstract void UseTool(Vector3 targetPosition);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user