(client) feat:添加设置类,子弹添加敌我识别; chore:修改了右键菜单的初始化方式为独立创建,加载定义报错提供更多信息,动画加载出错也返回默认序列。
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Managers;
|
||||
using Prefab;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
@ -7,6 +8,8 @@ namespace Entity
|
||||
{
|
||||
public class Outline : MonoBehaviour
|
||||
{
|
||||
public RightMenuPrefab rightMenuPrefab;
|
||||
|
||||
public GameObject body;
|
||||
public SpriteRenderer outlineRenderer;
|
||||
public CapsuleCollider2D outlineCollider;
|
||||
@ -96,10 +99,7 @@ namespace Entity
|
||||
// 检测是否按下的是鼠标右键
|
||||
if (Input.GetMouseButtonDown(1)) // 鼠标右键对应的是按钮索引 1
|
||||
{
|
||||
var rightMenu = Base.RightMenu.Instance;
|
||||
rightMenu.Init(GetMenu());
|
||||
rightMenu.Position = Input.mousePosition;
|
||||
rightMenu.Show();
|
||||
RightMenuManager.GenerateRightMenu(GetMenu(), Input.mousePosition);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user