• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ISkill类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: AddSkill

 public void AddSkill(ISkill skill)
 {
     if (_skillList.Count < _skillCapacity)
     {
         _skillList.Add(skill);
     }
 }
开发者ID:igm-capstone,项目名称:capstone-game-unity,代码行数:7,代码来源:SkillBar.cs


示例2: AskForCardUsage

        public bool AskForCardUsage(Prompt prompt, ICardUsageVerifier verifier, out ISkill skill, out List<Card> cards, out List<Player> players)
        {
            line = "U JiJiang 1: 2 3";
            Match m = Regex.Match(line, @"U\s(?<skill>[A-Za-z]*)(?<cards>(\s\d+)*):(?<players>(\s\d+)*)");
            skill = null;
            cards = null;
            players = null;
            if (m.Success)
            {
                if (m.Groups["skill"].Success)
                {
                    foreach (ISkill s in hostPlayer.Skills)
                    {
                        if (s is CardTransformSkill)
                        {

                        }
                        if (s is ActiveSkill)
                        {
                        }
                    }
                }
                return true;
            }
            else
            {
                return false;
            }
        }
开发者ID:pxoylngx,项目名称:sgs,代码行数:29,代码来源:TestUiProxy.cs


示例3: OnSkillActivated

    private void OnSkillActivated(Combatant combatant, ISkill skill)
    {
        // Unbind delegates from old skill
        if (_ranged != null) {
            _ranged.TargetChanged -= OnTargetChanged;
        } else if (_directional != null) {
            _directional.DirectionChanged -= OnDirectionChanged;
        }

        // Figure out origin from ActionQueue
        PawnAction lastAction = _combatant.LastAction;
        _origin = (lastAction == null) ? _combatant.Position : lastAction.PostRunPosition;

        // Figure out what kind of skill it is
        _ranged = skill as RangedSkill;
        _directional = skill as DirectionalSkill;

        // Bind delegates to new skill
        if (_ranged != null) {
            _ranged.TargetChanged += OnTargetChanged;
            OnTargetChanged(_ranged.Target);
        } else if (_directional != null) {
            _directional.DirectionChanged += OnDirectionChanged;
            OnDirectionChanged(_directional.Direction);
        }
    }
开发者ID:RolandMQuiros,项目名称:Lost-Generation,代码行数:26,代码来源:SkillView.cs


示例4: GetJudgeCardTrigger

 public GetJudgeCardTrigger(Player p, ISkill skill, ICard card, bool permenant = false)
 {
     Owner = p;
     jSkill = skill;
     jCard = card;
     doNotUnregister = permenant;
 }
开发者ID:RagingBigFemaleBird,项目名称:sgs,代码行数:7,代码来源:GetJudgeCardTrigger.cs


示例5: OnSkillDeactivated

 private void OnSkillDeactivated(Combatant combatant, ISkill skill)
 {
     _gridField.ClearPoints();
     _gridField.RebuildMesh();
     _ranged = null;
     _directional = null;
 }
开发者ID:RolandMQuiros,项目名称:Lost-Generation,代码行数:7,代码来源:SkillView.cs


示例6: GetSkillType

 private string GetSkillType(ISkill skill)
 {
     if(skill is Skill.ComboBonus)
     {
         return "コンボボーナス";
     }
     if (skill is Skill.ComboContinuation)
     {
         return "コンボ継続";
     }
     if (skill is Skill.DamageGuard)
     {
         return "ダメージガード";
     }
     if (skill is Skill.JudgeEnhancement)
     {
         return "判定強化";
     }
     if (skill is Skill.Revival)
     {
         return "ライフ回復";
     }
     if (skill is Skill.ScoreBonus)
     {
         return "スコアボーナス";
     }
     if (skill is Skill.Overload)
     {
         return "オーバーロード";
     }
     return null;
 }
开发者ID:noelex,项目名称:Cindeck,代码行数:32,代码来源:SkillTimeline.xaml.cs


示例7: FastVerify

 public override VerifierResult FastVerify(Player source, ISkill skill, List<Card> cards, List<Player> players)
 {
     if (skill != null || (cards != null && cards.Count != 0))
     {
         return VerifierResult.Fail;
     }
     if (players == null || players.Count == 0)
     {
         return VerifierResult.Partial;
     }
     foreach (Player p in players)
     {
         if (p == source)
         {
             return VerifierResult.Fail;
         }
         if (Game.CurrentGame.Decks[p, DeckType.Hand].Count == 0)
         {
             return VerifierResult.Fail;
         }
     }
     if (players.Count > 2)
     {
         return VerifierResult.Fail;
     }
     return VerifierResult.Success;
 }
开发者ID:pxoylngx,项目名称:sgs,代码行数:27,代码来源:TuXi.cs


示例8: IsReforging

 public override bool IsReforging(Player source, ISkill skill, List<Card> cards, List<Player> targets)
 {
     if (targets == null || targets.Count == 0)
     {
         return true;
     }
     return false;
 }
开发者ID:RagingBigFemaleBird,项目名称:sgs,代码行数:8,代码来源:TieSuoLianHuan.cs


示例9: AskForCardUsage

 public bool AskForCardUsage(Prompt prompt, ICardUsageVerifier verifier, out ISkill skill, out List<Card> cards, out List<Player> players, out Player respondingPlayer)
 {
     cards = null;
     skill = null;
     players = null;
     respondingPlayer = null;
     return false;
 }
开发者ID:kingling,项目名称:sgs,代码行数:8,代码来源:GlobalDummyProxy.cs


示例10: IsCorrectJudgeAction

 protected override bool IsCorrectJudgeAction(ISkill skill, ICard card)
 {
     if (askDel())
     {
         return true;
     }
     return false;
 }
开发者ID:h1398123,项目名称:sgs,代码行数:8,代码来源:TianDu.cs


示例11: IsCorrectJudgeAction

 protected override bool IsCorrectJudgeAction(ISkill skill, ICard card)
 {
     if (askDel())
     {
         this.skill.NotifySkillUse();
         return true;
     }
     return false;
 }
开发者ID:RagingBigFemaleBird,项目名称:sgs,代码行数:9,代码来源:TianDu.cs


示例12: Add

 public bool Add(ISkill skill)
 {
     if (NotAlreadyIn(skill))
     {
         skills.Add(skill);
         return true;
     }
     return false;
 }
开发者ID:imarcu,项目名称:EvidentaInvatamant,代码行数:9,代码来源:SkillRepository.cs


示例13: UpdateSubjects

        private void UpdateSubjects(ISkill skill)
        {
            this.skillTabView.SubjectsClear();

            ISubjectRepository subjectRepository = skill.Subjects;
            for (int i = 0; i < subjectRepository.GetSize();i++)
            {               
                this.skillTabView.AddSkillSubject(subjectRepository.GetAt(i));
           }
        }
开发者ID:imarcu,项目名称:EvidentaInvatamant,代码行数:10,代码来源:SkillTabController.cs


示例14: Worker

 private Worker(int id, ISkill skill, IShift shift) : this()
 {
     if (id == -1)
     {
         id = this.NextId();
     }
     ID = id;
     Skill = skill;
     Shift = shift;
 }
开发者ID:mikesurface,项目名称:SchedulingManager,代码行数:10,代码来源:Worker.cs


示例15: AskForCardUsage

 public bool AskForCardUsage(Prompt prompt, ICardUsageVerifier verifier, out ISkill skill, out List<Card> cards, out List<Player> players, out Player respondingPlayer)
 {
     this.prompt = prompt;
     this.verifier = verifier;
     foreach (var inactiveProxy in inactiveProxies)
     {
         if (inactiveProxy.HostPlayer != null && !inactiveProxy.HostPlayer.IsDead)
         {
             inactiveProxy.TryAskForCardUsage(prompt, new NullVerifier());
         }
     }
     pendingUiThread = new Thread(AskUiThread) { IsBackground = true };
     pendingUiThread.Start();
     proxy.SimulateReplayDelay();
     if (!proxy.TryAnswerForCardUsage(prompt, verifier, out skill, out cards, out players))
     {
         cards = new List<Card>();
         players = new List<Player>();
         skill = null;
     }
     pendingUiThread.Abort();
     pendingUiThread = null;
     foreach (var otherProxy in inactiveProxies)
     {
        otherProxy.Freeze();
     }
     proxy.Freeze();
     proxy.NextQuestion();
     // try to determine who used this
     respondingPlayer = null;
     if (cards != null && cards.Count > 0)
     {
         respondingPlayer = cards[0].Place.Player;
     }
     else
     {
         foreach (var p in Game.CurrentGame.Players)
         {
             if (p.ActionableSkills.Contains(skill))
             {
                 respondingPlayer = p;
                 break;
             }
         }
     }
     if (skill != null || (cards != null && cards.Count > 0))
     {
         Trace.Assert(respondingPlayer != null);
     }
     if (verifier.Verify(respondingPlayer, skill, cards, players) == VerifierResult.Success)
     {
         return true;
     }
     return false;
 }
开发者ID:RagingBigFemaleBird,项目名称:sgs,代码行数:55,代码来源:GlobalClientProxy.cs


示例16: AnswerItem

 public void AnswerItem(ISkill skill)
 {
     if (skill is CheatSkill)
     {
         sender.Send(skill);
     }
     else
     {
         sender.Send(Translator.Translate(skill));
     }
 }
开发者ID:maplegh,项目名称:sgs,代码行数:11,代码来源:Client.cs


示例17: Attack

        public override string Attack(ICharacter enemy, ISkill skill)
        {
            if (this.ManaPoints >= skill.ManaCost)
            {
                int damage = skill.Hit(enemy);
                this.ManaPoints -= skill.ManaCost;
                return string.Format("Enemy cast {0}\n and dealt {1} damage to you!", skill.Name, damage);
            }

            return string.Format("The {0} does not have enough mana to cast {1}", this.GetType().Name, skill.Name);
        }
开发者ID:Team-Camaron,项目名称:SeaAdventures,代码行数:11,代码来源:Enemy.cs


示例18: Add

        public static void Add(IContext context, ISkill skill)
        {
            Context ctx = context as Context;
            if (ctx == null)
                throw new Exception(typeof(Context).FullName + " expected.");

            SqlCommand command = new SqlCommand("insert into Skill (title) values (@Title)");
            command.Parameters.Add(new SqlParameter("Title", skill.Title));

            command.ExecuteNonQuery();
        }
开发者ID:NitrOxygeN1,项目名称:CrowdHunting,代码行数:11,代码来源:SkillUtility.cs


示例19: Attack

        public override string Attack(ICharacter enemy, ISkill skill)
        {
            if (this.ManaPoints >= skill.ManaCost)
            {
                int damage = skill.Hit(enemy);
                this.ManaPoints -= skill.ManaCost;
                return string.Format("You cast {0}{1} and dealt {2} damage to the enemy!",
                                    skill.Name, Environment.NewLine, damage);
            }

            return string.Format(Messages.NotEnoughManaError, skill.Name);
        }
开发者ID:Team-Camaron,项目名称:SeaAdventures,代码行数:12,代码来源:Player.cs


示例20: BipedSkillPalette

        public BipedSkillPalette(Actor owner)
            : base(owner)
        {
            Skills = new ISkill[EquipSlot.NUM_SKILL_SLOTS];
            for (int s = 0; s < EquipSlot.NUM_SKILL_SLOTS; ++s)
            {
                Skills[s] = null;
            }

            mCharacterInfo = null;
            mContentLoader = null;
        }
开发者ID:Tengato,项目名称:Mechadrone1,代码行数:12,代码来源:BipedSkillPalette.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ISmsSender类代码示例发布时间:2022-05-24
下一篇:
C# ISitecoreService类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap