(client)feat:实现按武器释放技能
This commit is contained in:
@ -27,6 +27,7 @@ namespace UI
|
||||
InitMonster();
|
||||
InitBuilding();
|
||||
InitItem();
|
||||
InitWeapon();
|
||||
}
|
||||
|
||||
private void InitReloadGameButton()
|
||||
@ -101,7 +102,7 @@ namespace UI
|
||||
"生成怪物",
|
||||
"未定义任何怪物",
|
||||
def => def.label,
|
||||
GenerateEntityCallback);
|
||||
GenerateMonsterEntityCallback);
|
||||
}
|
||||
|
||||
private void InitBuilding()
|
||||
@ -170,7 +171,16 @@ namespace UI
|
||||
entityPlacementUI.snapEnabled = false;
|
||||
UIInputControl.Instance.Show(entityPlacementUI);
|
||||
}
|
||||
|
||||
private void GenerateMonsterEntityCallback(MonsterDef monsterDef)
|
||||
{
|
||||
entityPlacementUI.currentAction = () =>
|
||||
{
|
||||
Managers.EntityManage.Instance.GenerateMonsterEntity(Program.Instance.FocusedDimensionId,monsterDef, Utils.MousePosition.GetWorldPosition());
|
||||
};
|
||||
entityPlacementUI.Prompt = $"当前生成器:\n名称:{monsterDef.label}\n描述:{monsterDef.description}";
|
||||
entityPlacementUI.snapEnabled = false;
|
||||
UIInputControl.Instance.Show(entityPlacementUI);
|
||||
}
|
||||
private void GenerateBuildingCallback(BuildingDef def)
|
||||
{
|
||||
entityPlacementUI.currentAction = () =>
|
||||
|
Reference in New Issue
Block a user