本文整理汇总了C#中Combat类的典型用法代码示例。如果您正苦于以下问题:C# Combat类的具体用法?C# Combat怎么用?C# Combat使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Combat类属于命名空间,在下文中一共展示了Combat类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Run
public override void Run(Combat.Character character)
{
Int32 spritepriority = EvaluationHelper.AsInt32(character, Priority, 0);
spritepriority = Misc.Clamp(spritepriority, -5, 5);
character.DrawOrder = spritepriority;
}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:7,代码来源:SprPriority.cs
示例2: Run
public override void Run(Combat.Character character)
{
Int32 time = EvaluationHelper.AsInt32(character, Time, 1);
Int32 target_id = EvaluationHelper.AsInt32(character, TargetId, Int32.MinValue);
Vector2 offset = EvaluationHelper.AsVector2(character, Position, new Vector2(0, 0));
foreach (Combat.Character target in character.GetTargets(target_id))
{
switch (BindPosition)
{
case BindToTargetPostion.Mid:
offset += target.BasePlayer.Constants.Midposition;
break;
case BindToTargetPostion.Head:
offset += target.BasePlayer.Constants.Headposition;
break;
case BindToTargetPostion.None:
case BindToTargetPostion.Foot:
default:
break;
}
character.Bind.Set(target, offset, time, 0, false);
break;
}
}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:28,代码来源:BindToTarget.cs
示例3: Run
public override void Run(Combat.Character character)
{
character.OffensiveInfo.MoveContact = 0;
character.OffensiveInfo.MoveGuarded = 0;
character.OffensiveInfo.MoveHit = 0;
character.OffensiveInfo.MoveReversed = 0;
}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:7,代码来源:MoveHitReset.cs
示例4: Run
public override void Run(Combat.Character character)
{
Int32? start = EvaluationHelper.AsInt32(character, StartRange, null);
Int32? end = EvaluationHelper.AsInt32(character, EndRange, null);
if (IntNumber != null)
{
Int32? value = EvaluationHelper.AsInt32(character, IntNumber, null);
if (value != null)
{
for (Int32 i = 0; i != character.Variables.IntegerVariables.Count; ++i)
{
if (i < start || i > end) continue;
character.Variables.SetInteger(i, false, value.Value);
}
}
}
if (FloatNumber != null)
{
Single? value = EvaluationHelper.AsSingle(character, FloatNumber, null);
if (value != null)
{
for (Int32 i = 0; i != character.Variables.FloatVariables.Count; ++i)
{
if (i < start || i > end) continue;
character.Variables.SetFloat(i, false, value.Value);
}
}
}
}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:31,代码来源:VarRangeSet.cs
示例5: Run
public override void Run(Combat.Character character)
{
Single x = EvaluationHelper.AsSingle(character, X, 0);
Single y = EvaluationHelper.AsSingle(character, Y, 0);
character.Move(new Vector2(x, y));
}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:7,代码来源:PosAdd.cs
示例6: Draw
public override void Draw(Combat.PaletteFx palettefx)
{
Point tilestart;
Point tileend;
GetTileLength(Sprite.Size, out tilestart, out tileend);
Video.DrawState drawstate = SpriteManager.DrawState;
drawstate.Reset();
drawstate.Blending = Transparency;
drawstate.ScissorRectangle = DrawRect;
drawstate.Set(Sprite);
for (Int32 y = tilestart.Y; y != tileend.Y; ++y)
{
for (Int32 x = tilestart.X; x != tileend.X; ++x)
{
Vector2 adjustment = (Vector2)(Sprite.Size + TilingSpacing) * new Vector2(x, y);
Vector2 location = CurrentLocation + adjustment;
drawstate.AddData(location, null);
}
}
if (palettefx != null) palettefx.SetShader(drawstate.ShaderParameters);
drawstate.Use();
}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:27,代码来源:Static.cs
示例7: Questor
public Questor()
{
_lastPulse = DateTime.MinValue;
_random = new Random();
_salvage = new Salvage();
_defense = new Defense();
_combat = new Combat();
_traveler = new Traveler();
_unloadLoot = new UnloadLoot();
_agentInteraction = new AgentInteraction();
_arm = new Arm();
_missionController = new MissionController();
_drones = new Drones();
_panic = new Panic();
_storyline = new Storyline();
Settings.Instance.SettingsLoaded += SettingsLoaded;
// State fixed on ExecuteMission
State = QuestorState.Idle;
_directEve = new DirectEve();
Cache.Instance.DirectEve = _directEve;
_directEve.OnFrame += OnFrame;
}
开发者ID:vega87,项目名称:questor,代码行数:28,代码来源:Questor.cs
示例8: Init
// Use this for initialization
public void Init()
{
player_combatData = GameObject.Find("player").GetComponent<Combat>();
health = playerHealth.GetComponent<Slider>();
mana = playerMana.GetComponent<Slider>();
init = true;
}
开发者ID:JD95,项目名称:Factionless,代码行数:8,代码来源:StatsManager.cs
示例9: Trigger
public Boolean Trigger(Combat.Character character)
{
if (character == null) throw new ArgumentNullException("character");
foreach (var trigger in m_triggers)
{
Boolean ok = true;
foreach (Evaluation.Expression exp in trigger.Value)
{
if(exp.EvaluateFirst(character).BooleanValue == false)
{
ok = false;
break;
}
}
if (ok == true)
{
if (trigger.Key != 0) return true;
}
else
{
if (trigger.Key == 0) return false;
}
}
return false;
}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:28,代码来源:TriggerMap.cs
示例10: Run
public override void Run(Combat.Character character)
{
Single x = EvaluationHelper.AsSingle(character, X, 0);
Single y = EvaluationHelper.AsSingle(character, Y, 0);
character.CurrentVelocity += new Vector2(x, y);
}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:7,代码来源:VelAdd.cs
示例11: Run
public override void Run(Combat.Character character)
{
Int32 explod_id = EvaluationHelper.AsInt32(character, Id, Int32.MinValue);
Int32 time = EvaluationHelper.AsInt32(character, Time, 1);
foreach (Combat.Explod explod in character.GetExplods(explod_id)) explod.Data.BindTime = time;
}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:7,代码来源:ExplodBindTime.cs
示例12: Storyline
public Storyline()
{
_combat = new Combat();
_traveler = new Traveler();
_agentInteraction = new AgentInteraction();
_agentBlacklist = new List<long>();
_storylines = new Dictionary<string, IStoryline>();
//_storylines.Add("__", new GenericCombatStoryline());
//_storylines.Add("Materials For War Preparation", new MaterialsForWarPreparation());
_storylines.Add("Shipyard Theft", new GenericCombatStoryline());
_storylines.Add("Evolution", new GenericCombatStoryline());
_storylines.Add("Record Cleaning", new GenericCombatStoryline());
_storylines.Add("Covering Your Tracks", new GenericCombatStoryline());
_storylines.Add("Crowd Control", new GenericCombatStoryline());
_storylines.Add("A Force to Be Reckoned With", new GenericCombatStoryline());
_storylines.Add("Kidnappers Strike - Ambush In The Dark (1 of 10)", new GenericCombatStoryline());
_storylines.Add("Kidnappers Strike - The Kidnapping (3 of 10)", new GenericCombatStoryline());
_storylines.Add("Kidnappers Strike - Incriminating Evidence (5 of 10)", new GenericCombatStoryline());
_storylines.Add("Kidnappers Strike - The Secret Meeting (7 of 10)", new GenericCombatStoryline());
_storylines.Add("Kidnappers Strike - Defend the Civilian Convoy (8 of 10)", new GenericCombatStoryline());
_storylines.Add("Kidnappers Strike - Retrieve the Prisoners (9 of 10)", new GenericCombatStoryline());
_storylines.Add("Kidnappers Strike - The Final Battle (10 of 10)", new GenericCombatStoryline());
_storylines.Add("Whispers in the Dark - First Contact (1 of 4)", new GenericCombatStoryline());
_storylines.Add("Whispers in the Dark - Lay and Pray (2 of 4)", new GenericCombatStoryline());
_storylines.Add("Whispers in the Dark - The Outpost (4 of 4)", new GenericCombatStoryline());
_storylines.Add("Transaction Data Delivery", new TransactionDataDelivery());
_storylines.Add("Innocents in the Crossfire", new TransactionDataDelivery());
}
开发者ID:PulsarXC,项目名称:Questor,代码行数:30,代码来源:Storyline.cs
示例13: init
public override void init()
{
combatData = gameObject.GetComponent<Combat>();
movement = gameObject.GetComponent<Navigation>();
ai = GetComponent<HasObjectivePath>();
}
开发者ID:JD95,项目名称:Factionless,代码行数:7,代码来源:Destroy_Nexus.cs
示例14: changeTarget
public void changeTarget()
{
if (player.target == null) return;
player_target.SetActive(true);
target = player.target.GetComponent<Combat>();
if(TeamLogic.areAllies(target.gameObject, player.gameObject))
{
targetHealth.color = new Color(0, 255, 0);
}
else
{
targetHealth.color = new Color(255, 0, 0);
}
/*
if(target.maxMana() > 0)
{
targetMana.color = new Color(0, 0, 255);
}
else
{
targetMana.color = new Color(255, 255, 255);
}
*/
}
开发者ID:JD95,项目名称:Factionless,代码行数:28,代码来源:Player_Target.cs
示例15: GetRange
Boolean GetRange(Combat.Character character, out Int32 min, out Int32 max)
{
if (Range == null)
{
min = 0;
max = 1000;
return true;
}
Evaluation.Number[] result = Range.Evaluate(character);
if (result.Length > 0 && result[0].NumberType != NumberType.None)
{
if (result.Length > 1 && result[1].NumberType != NumberType.None)
{
min = result[0].IntValue;
max = result[1].IntValue;
return true;
}
else
{
min = 0;
max = result[0].IntValue;
return true;
}
}
min = 0;
max = 1;
return false;
}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:31,代码来源:VarRandom.cs
示例16: Run
public override void Run(Combat.Character character)
{
Int32 animationnumber = EvaluationHelper.AsInt32(character, AnimationNumber, 0);
Boolean drawunder = EvaluationHelper.AsBoolean(character, DrawUnder, false);
Point offset = EvaluationHelper.AsPoint(character, DrawPosition, new Point(0, 0));
Int32 randomdisplacement = EvaluationHelper.AsInt32(character, RandomDisplacement, 0);
Combat.ExplodData data = new xnaMugen.Combat.ExplodData();
data.Scale = Vector2.One;
data.AnimationNumber = animationnumber;
data.CommonAnimation = true;
data.Location = (Vector2)offset;
data.PositionType = PositionType.P1;
data.RemoveTime = -2;
data.DrawOnTop = false;
data.OwnPalFx = true;
data.SpritePriority = (drawunder == true) ? -9 : 9;
data.Random = new Point(randomdisplacement / 2, randomdisplacement / 2);
data.Transparency = new Blending();
data.Creator = character;
data.Offseter = character;
Combat.Explod explod = new Combat.Explod(character.Engine, data);
if (explod.IsValid == true) explod.Engine.Entities.Add(explod);
}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:25,代码来源:GameMakeAnim.cs
示例17: Recording
public Recording(Combat.EngineInitialization init, List<RecordingData> data)
{
if (init == null) throw new ArgumentNullException("init");
if (data == null) throw new ArgumentNullException("data");
m_initsettings = init;
m_data = data;
}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:8,代码来源:Recording.cs
示例18: Run
public override void Run(Combat.Character character)
{
Vector3 color = EvaluationHelper.AsVector3(character, ScreenColor, Vector3.One);
Int32 time = EvaluationHelper.AsInt32(character, Time, 1);
Boolean underflag = EvaluationHelper.AsBoolean(character, Under, false);
character.Engine.EnvironmentColor.Setup(color, time, underflag);
}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:8,代码来源:EnvColor.cs
示例19: Run
public override void Run(Combat.Character character)
{
Int32? hits = EvaluationHelper.AsInt32(character, Hits, null);
if (hits == null || hits <= 0) return;
character.Team.Display.ComboCounter.AddHits(hits.Value);
}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:8,代码来源:HitAdd.cs
示例20: Attack
public Attack(Combat.attackPhase phase, int skill, string damageExpression, bool isAP = false)
{
this.AttackPhase = phase;
this.Skill = skill;
this.DamageExpression = damageExpression;
this.parseDamageExpression();
this.IsAP = isAP;
}
开发者ID:valambrian,项目名称:wbcomtest,代码行数:8,代码来源:Attack.cs
注:本文中的Combat类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论