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


C# ISkill.GetType方法代码示例

本文整理汇总了C#中ISkill.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# ISkill.GetType方法的具体用法?C# ISkill.GetType怎么用?C# ISkill.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ISkill的用法示例。


在下文中一共展示了ISkill.GetType方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: NotifyImpersonation

 public void NotifyImpersonation(Player p, Hero impersonator, Hero impersonatedHero, ISkill acquiredSkill)
 {
     Application.Current.Dispatcher.Invoke((ThreadStart)delegate()
     {
         var view = playersMap[p];
         var model = view.PlayerModel.GetHeroModel(impersonator);
         Trace.Assert(model != null);
         if (impersonatedHero == null)
         {
             model.ImpersonatedHeroName = string.Empty;
             model.ImpersonatedSkill = string.Empty;
         }
         else
         {
             model.ImpersonatedHeroName = impersonatedHero.Name;
             model.ImpersonatedSkill = acquiredSkill.GetType().Name;
         }
         view.UpdateImpersonateStatus(model == view.PlayerModel.Hero1Model);
     });
 }
开发者ID:RagingBigFemaleBird,项目名称:sgs,代码行数:20,代码来源:GameView.xaml.cs

示例2: NotifyImpersonation

 public void NotifyImpersonation(Player p, Core.Heroes.Hero h, ISkill s)
 {
     Application.Current.Dispatcher.Invoke((ThreadStart)delegate()
     {
         var model = playersMap[p].PlayerModel;
         if (h == null)
         {
             model.ImpersonatedHeroName = string.Empty;
             model.ImpersonatedSkill = string.Empty;
         }
         else
         {
             model.ImpersonatedHeroName = h.Name;
             model.ImpersonatedSkill = s.GetType().Name;
         }
     });
 }
开发者ID:h1398123,项目名称:sgs,代码行数:17,代码来源:GameView.xaml.cs

示例3: Translate

 public static string Translate(ISkill skill)
 {
     if (skill == null) return string.Empty;
     string key = string.Format("Skill.{0}.Name", skill.GetType().Name);
     string name = Application.Current.TryFindResource(key) as string;
     if (name == null) return string.Empty;
     return name;
 }
开发者ID:shonwang,项目名称:sgs,代码行数:8,代码来源:LogFormatter.cs

示例4: Translate

 public static SkillItem Translate(ISkill skill)
 {
     SkillItem item = new SkillItem();
     item.playerId = skill.Owner.Id;
     item.name = skill.GetType().Name;
     if (skill is IAdditionalTypedSkill)
     {
         item.additionalType = (skill as IAdditionalTypedSkill).AdditionalType.GetType();
     }
     return item;
 }
开发者ID:kissgoodbye,项目名称:sgs,代码行数:11,代码来源:SerializableItems.cs

示例5: SendCardUsage

 public void SendCardUsage(ISkill skill, List<Card> cards, List<Player> players, ICardUsageVerifier verifier)
 {
     for (int i = 0; i < server.MaxClients; i++)
     {
         server.SendObject(i, 1);
         if (skill != null)
         {
             server.SendObject(i, 1);
             server.SendObject(i, skill);
         }
         else
         {
             server.SendObject(i, 0);
         }
         if (cards != null)
         {
             server.SendObject(i, cards.Count);
             if (skill is ActiveSkill)
             {
                 (skill as ActiveSkill).CardRevealPolicy(Game.CurrentGame.Players[i], cards, players);
             }
             foreach (Card c in cards)
             {
                 if (!(skill is ActiveSkill) && !(skill != null && skill.GetType().Name.Contains("GuHuo")) && !(verifier.Helper.NoCardReveal))
                 {
                     if (c.Place.DeckType != DeckType.Equipment && c.Place.DeckType != DeckType.DelayedTools)
                     {
                         c.RevealOnce = true;
                     }
                 }
                 if (c.Place.DeckType == DeckType.Equipment || c.Place.DeckType == DeckType.DelayedTools)
                 {
                     c.RevealOnce = false;
                 }
                 server.SendObject(i, c);
             }
         }
         else
         {
             server.SendObject(i, 0);
         }
         if (players != null)
         {
             server.SendObject(i, players.Count);
             foreach (Player p in players)
             {
                 server.SendObject(i, p);
             }
         }
         else
         {
             server.SendObject(i, 0);
         }
         server.Flush(i);
     }
 }
开发者ID:pxoylngx,项目名称:sgs,代码行数:56,代码来源:ServerNetworkUiProxy.cs

示例6: EncodeSkill

 public static SkillItem EncodeSkill(ISkill skill)
 {
     SkillItem item = new SkillItem();
     item.playerId = skill.Owner.Id;
     item.name = skill.GetType().Name;
     item.skillId = Game.CurrentGame.Players[skill.Owner.Id].ActionableSkills.IndexOf(skill);
     Trace.Assert(item.skillId >= 0);
     if (skill is IAdditionalTypedSkill)
     {
         var type = (skill as IAdditionalTypedSkill).AdditionalType;
         string horseName;
         EncodeCardHandler(type, out item.additionalTypeName, out horseName);
     }
     return item;
 }
开发者ID:kingling,项目名称:sgs,代码行数:15,代码来源:SerializableItems.cs

示例7: Translate

 public static SkillItem Translate(ISkill skill)
 {
     SkillItem item = new SkillItem();
     item.playerId = skill.Owner.Id;
     item.name = skill.GetType().Name;
     item.skillId = Game.CurrentGame.Players[skill.Owner.Id].ActionableSkills.IndexOf(skill);
     Trace.Assert(item.skillId >= 0);
     if (skill is IAdditionalTypedSkill)
     {
         item.additionalType = (skill as IAdditionalTypedSkill).AdditionalType.GetType();
     }
     return item;
 }
开发者ID:pxoylngx,项目名称:sgs,代码行数:13,代码来源:SerializableItems.cs


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