本文整理汇总了C#中WorldObject.SetSelection方法的典型用法代码示例。如果您正苦于以下问题:C# WorldObject.SetSelection方法的具体用法?C# WorldObject.SetSelection怎么用?C# WorldObject.SetSelection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WorldObject
的用法示例。
在下文中一共展示了WorldObject.SetSelection方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ChangeSelection
/*** Private worker methods ***/
private void ChangeSelection(WorldObject worldObject, Player controller)
{
//this should be called by the following line, but there is an outside chance it will not
SetSelection(false);
if(controller.SelectedObject) controller.SelectedObject.SetSelection(false);
controller.SelectedObject = worldObject;
worldObject.SetSelection(true);
}
示例2: ChangeSelection
private void ChangeSelection(WorldObject worldObject, Player player)
{
//this should be called by the following line, but there is an outside chance it will not
SetSelection(false, this.playingArea);
if(player.SelectedObject) player.SelectedObject.SetSelection(false, this.playingArea);
player.SelectedObject = worldObject;
worldObject.SetSelection(true, this.playingArea);
}
示例3: ChangeSelection
private void ChangeSelection(WorldObject worldObject, Player controller)
{
//cela devrait être appelé par la ligne suivante, mais il y a une petite chance qu'il ne sera pas
if ((!Input.GetKey(KeyCode.LeftShift) || worldObject.GetComponent<Resource>() || !worldObject.IsOwnedBy(player)))
{
SetSelection(false, playingArea);
if (controller.SelectedObject.Count > 0)
{
foreach (WorldObject wo in new ArrayList(controller.SelectedObject))
{
wo.SetSelection(false, playingArea);
}
}
controller.SelectedObject.Clear();
}
controller.SelectedObject.Add(worldObject);
worldObject.SetSelection(true, controller.hud.GetPlayingArea());
}
示例4: AddSelection
public void AddSelection(WorldObject u)
{
u.SetSelection(true, this.hud.GetPlayingArea());
selections.Add(u);
}
示例5: ChangeSelection
private void ChangeSelection(WorldObject worldObject, Player controller)
{
//this should be called by the following line, but there is an outside chance it will not
// dont know what the above line means, should have explained more, but i probably didnt know what i was saying at the time i wrote it
SetSelection(false, playingArea);
if(controller.SelectedObject) controller.SelectedObject.SetSelection(false, playingArea);
controller.SelectedObject = worldObject;
worldObject.SetSelection(true, controller.hud.GetPlayingArea());
}