本文整理汇总了C#中ISkill类的典型用法代码示例。如果您正苦于以下问题:C# ISkill类的具体用法?C# ISkill怎么用?C# ISkill使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISkill类属于命名空间,在下文中一共展示了ISkill类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddSkill
public void AddSkill(ISkill skill)
{
if (_skillList.Count < _skillCapacity)
{
_skillList.Add(skill);
}
}
示例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;
}
}
示例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);
}
}
示例4: GetJudgeCardTrigger
public GetJudgeCardTrigger(Player p, ISkill skill, ICard card, bool permenant = false)
{
Owner = p;
jSkill = skill;
jCard = card;
doNotUnregister = permenant;
}
示例5: OnSkillDeactivated
private void OnSkillDeactivated(Combatant combatant, ISkill skill)
{
_gridField.ClearPoints();
_gridField.RebuildMesh();
_ranged = null;
_directional = null;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例10: IsCorrectJudgeAction
protected override bool IsCorrectJudgeAction(ISkill skill, ICard card)
{
if (askDel())
{
return true;
}
return false;
}
示例11: IsCorrectJudgeAction
protected override bool IsCorrectJudgeAction(ISkill skill, ICard card)
{
if (askDel())
{
this.skill.NotifySkillUse();
return true;
}
return false;
}
示例12: Add
public bool Add(ISkill skill)
{
if (NotAlreadyIn(skill))
{
skills.Add(skill);
return true;
}
return false;
}
示例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));
}
}
示例14: Worker
private Worker(int id, ISkill skill, IShift shift) : this()
{
if (id == -1)
{
id = this.NextId();
}
ID = id;
Skill = skill;
Shift = shift;
}
示例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;
}