本文整理汇总了C#中TimerCallback.GetFieldValue方法的典型用法代码示例。如果您正苦于以下问题:C# TimerCallback.GetFieldValue方法的具体用法?C# TimerCallback.GetFieldValue怎么用?C# TimerCallback.GetFieldValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TimerCallback
的用法示例。
在下文中一共展示了TimerCallback.GetFieldValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Timer_Callback
public void Timer_Callback(TimerCallback timer)
{
var gid = timer.GetFieldValue("gid");
var player = Server.Players[gid];
try
{
CommunityEntity.ServerInstance.ClientRPCEx(new Network.SendInfo()
{
connection = player.basePlayer.net.connection
}, null, "DestroyUI", "testpanel7766");
}
catch(ArgumentNullException){
}
var commui = new PlutonUIEntity(player.basePlayer.net.connection);
var testpanel7766 = commui.AddPanel(
"TestPanel7766",
"Overlay"
);
testpanel7766.AddComponent (new Pluton.PlutonUI.RectTransform(){
anchormin = "0 0",
anchormax = "1 1"
});
var nonamepanel = commui.AddPanel (null, "TestPanel7766");
nonamepanel.AddComponent (new Pluton.PlutonUI.RectTransform(){
anchormin = "0 0.5",
anchormax = "1 0.9"
});
nonamepanel.AddComponent (new Pluton.PlutonUI.Text(){
text = "Prefab Name",
fontSize = 20,
align = "TopCenter"
});
Vector3 loc = player.GetLookPoint();
RaycastHit[] hit = Physics.RaycastAll(loc, Vector3.down);
foreach (RaycastHit x in hit)
{
if (x.collider.gameObject.ToBaseEntity() != null)
{
nonamepanel.AddComponent (new Pluton.PlutonUI.Text () {
text = x.collider.gameObject.ToBaseEntity().name,
fontSize = 20,
align = "MiddleCenter"
});
}
}
commui.CreateUI();
}