1
This commit is contained in:
@@ -3,3 +3,20 @@
|
||||
Source:[loxodon-framework/Loxodon.Framework.TextUGUI at master · vovgou/loxodon-framework · GitHub](https://github.com/vovgou/loxodon-framework/tree/master/Loxodon.Framework.TextUGUI)
|
||||
|
||||
---
|
||||
|
||||
|
||||
单向绑定
|
||||
``` csharp
|
||||
[OnValueChanged(viewModel=>viewModel.hp, value=>string.Format("{0:D4}"))]
|
||||
CustomText text;
|
||||
|
||||
public class CustomText
|
||||
{
|
||||
public Text text;
|
||||
public void SetText(string str)
|
||||
{
|
||||
text.text = str;
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user