当前位置: 首页>>代码示例>>C#>>正文


C# WorldObject.SetSelection方法代码示例

本文整理汇总了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);
 }
开发者ID:jn5414,项目名称:unity-rts-demo,代码行数:9,代码来源:WorldObject.cs

示例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);
 }
开发者ID:devend711,项目名称:game-tutorial,代码行数:8,代码来源:WorldObject.cs

示例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());
 }
开发者ID:Phelisse,项目名称:Elynium,代码行数:18,代码来源:WorldObject.cs

示例4: AddSelection

 public void AddSelection(WorldObject u)
 {
     u.SetSelection(true, this.hud.GetPlayingArea()); 
     selections.Add(u);
 }
开发者ID:MaximeKestemont,项目名称:RTS_game,代码行数:5,代码来源:Player.cs

示例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());
 }
开发者ID:derogers,项目名称:RTS_Game,代码行数:9,代码来源:WorldObject.cs


注:本文中的WorldObject.SetSelection方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。