(client)feat:实现子弹定义以及生成,实现初始化动画,实现血条 (#43)
Co-authored-by: zzdxxz <2079238449@qq.com> Co-committed-by: zzdxxz <2079238449@qq.com>
This commit is contained in:
@ -13,6 +13,9 @@ namespace UI
|
||||
|
||||
public NonReturnCallback currentAction;
|
||||
|
||||
public GameObject focusBox;
|
||||
public bool snapEnabled = false;
|
||||
|
||||
public string Prompt
|
||||
{
|
||||
get => promptText.text;
|
||||
@ -30,7 +33,28 @@ namespace UI
|
||||
{
|
||||
currentAction();
|
||||
}
|
||||
|
||||
if (snapEnabled)
|
||||
{
|
||||
focusBox.transform.position = Utils.MousePosition.GetSnappedWorldPosition();
|
||||
}
|
||||
else
|
||||
{
|
||||
focusBox.transform.position = Utils.MousePosition.GetWorldPosition();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public override void Show()
|
||||
{
|
||||
base.Show();
|
||||
focusBox.SetActive(true);
|
||||
}
|
||||
|
||||
override public void Hide()
|
||||
{
|
||||
base.Hide();
|
||||
focusBox.SetActive(false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user