本文整理汇总了C#中GameObjectType类的典型用法代码示例。如果您正苦于以下问题:C# GameObjectType类的具体用法?C# GameObjectType怎么用?C# GameObjectType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GameObjectType类属于命名空间,在下文中一共展示了GameObjectType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetEnemyKS
public static Obj_AI_Base GetEnemyKS(GameObjectType type, AttackSpell spell, bool EwithQ = false)
{
float range = 0;
if (spell == AttackSpell.Q)
range = Program.Q.Range;
else if (spell == AttackSpell.E)
range = Program.E.Range + 200;
else if (spell == AttackSpell.Ignite)
range = Program.Ignite.Range;
else if (spell == AttackSpell.R)
range = int.MaxValue;
//ksing
return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).Where(a => a.IsEnemy
&& a.Type == type
&& a.Distance(GP) <= range
&& !a.IsDead
&& !a.IsInvulnerable
&& a.Name != "Barrel"
&& a.IsValidTarget(range)
&&
(
(a.Health <= GPCalcs.Q(a) && AttackSpell.Q == spell && !NearbyBarrel(350, a.Position)) ||
(a.Health <= GPCalcs.E(a, EwithQ) && AttackSpell.E == spell) ||
(a.Health <= (GPCalcs.RDamagePerWave(a) * 8) && AttackSpell.R == spell) ||
(a.Health <= GPCalcs.Ignite(a) && AttackSpell.Ignite == spell)
)).FirstOrDefault();
}
开发者ID:Sicryption,项目名称:EloBuddyAddons,代码行数:27,代码来源:GangplankFuncs.cs
示例2: CreateNewObject
public GameObject CreateNewObject(GameObjectType type)
{
GameObject go = null;
switch (type)
{
case GameObjectType.Stone:
go = GameObject.Instantiate(ObjectPoolObjects.Instance.Stones[UnityEngine.Random.Range(0, ObjectPoolObjects.Instance.Stones.Count)]);
break;
case GameObjectType.Tree:
go = GameObject.Instantiate(ObjectPoolObjects.Instance.Trees[UnityEngine.Random.Range(0, ObjectPoolObjects.Instance.Trees.Count)]);
break;
case GameObjectType.Decoration:
//go = GameObject.Instantiate(MapGenerator.GetInstance().decoration[UnityEngine.Random.Range(0, MapGenerator.GetInstance().decoration.Count)]);
break;
}
if (go != null)
{
PoolList list = this.GetList(type);
if (list != null)
{
list.AddGameObject(go);
}
}
return go;
}
开发者ID:SHEePYTaGGeRNeP,项目名称:FontysMobileGameJam,代码行数:27,代码来源:ObjectPool.cs
示例3: GetEnemy
public static Obj_AI_Base GetEnemy(GameObjectType type, AttackSpell spell)
{
var eminion =
EntityManager.MinionsAndMonsters.GetJungleMonsters(Program.Eve.Position, Program.E.Range)
.FirstOrDefault(
m =>
m.Distance(Program.Eve) <= Program.E.Range &&
m.Health <= Misc.Ecalc(m) &&
m.IsValidTarget());
if (Program.E.IsReady() && Program.LaneJungleClear["LCE"].Cast<CheckBox>().CurrentValue && eminion != null &&
!Orbwalker.IsAutoAttacking)
{
Program.E.Cast(eminion);
}
if (spell == AttackSpell.Q)
{
return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).FirstOrDefault(a => a.IsEnemy
&& a.Type == type
&&
a.Distance(Evelynn) <=
Program.Q.Range
&& !a.IsDead
&& !a.IsInvulnerable
&&
a.IsValidTarget(
Program.Q.Range)
&&
a.Health <=
Misc.Qcalc(a));
}
return null;
}
开发者ID:Neafle,项目名称:EloBuddy-1,代码行数:35,代码来源:LaneJungleClearA.cs
示例4: MinionLh
public static Obj_AI_Base MinionLh(GameObjectType type, AttackSpell spell)
{
return EntityManager.MinionsAndMonsters.EnemyMinions.OrderBy(a => a.Health).FirstOrDefault(a => a.IsEnemy
&&
a.Type ==
type
&&
a.Distance(
Vladimir) <=
Program.Q
.Range
&& !a.IsDead
&&
!a
.IsInvulnerable
&&
a
.IsValidTarget
(
Program
.Q
.Range)
&&
a.Health <=
Misc.Qdmg(a));
}
开发者ID:globalik,项目名称:EloBuddy,代码行数:26,代码来源:LastHitA.cs
示例5: GetBestELocation
public static Obj_AI_Base GetBestELocation(GameObjectType type)
{
var numEnemiesInRange = 0;
Obj_AI_Base enem = null;
foreach (var enemy in ObjectManager.Get<Obj_AI_Base>()
.OrderBy(a => a.Health)
.Where(a => a.Distance(Vladimir) <= Program.E.Range
&& a.IsEnemy
&& a.Type == type
&& !a.IsDead
&& !a.IsInvulnerable))
{
var tempNumEnemies =
ObjectManager.Get<Obj_AI_Base>()
.OrderBy(a => a.Health)
.Where(
a =>
a.Distance(Vladimir) <= Program.E.Range && a.IsEnemy && !a.IsDead && a.Type == type &&
!a.IsInvulnerable)
.Count(enemy2 => enemy != enemy2 && enemy2.Distance(enemy) <= 75);
if (tempNumEnemies > numEnemiesInRange)
{
enem = enemy;
numEnemiesInRange = tempNumEnemies;
}
}
return enem;
}
开发者ID:qazwsxqsz,项目名称:EloBuddy,代码行数:29,代码来源:Combo.cs
示例6: Create
public void Create(int gameObjectId, GameObjectType gameObjectType, Vector2 position, Vector2 velocity)
{
GameObjectType = gameObjectType;
GameObjectId = gameObjectId;
Position = position;
Velocity = velocity;
}
开发者ID:crescent,项目名称:beyondinfinity,代码行数:7,代码来源:AiIdentifiableObjectInfo.cs
示例7: GetEnemyKS
public static Obj_AI_Base GetEnemyKS(GameObjectType type, AttackSpell spell)
{
float range = 0;
if (spell == AttackSpell.W)
range = Program.W.Range;
else if (spell == AttackSpell.R)
range = Program.R.Range + (Program.R.Width /2);
else if (spell == AttackSpell.Q)
range = Program.Q.Range;
else if (spell == AttackSpell.Ignite)
range = Program.Ignite.Range;
//ksing
return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).Where(a => a.IsEnemy
&& a.Type == type
&& a.Distance(Annie) <= range
&& !a.IsDead
&& !a.IsInvulnerable
&& a.IsValidTarget(range)
&&
(
(a.Health <= AnnieCalcs.W(a) && AttackSpell.W == spell) ||
(a.Health <= AnnieCalcs.Q(a) && AttackSpell.Q == spell) ||
(a.Health <= AnnieCalcs.R(a) && AttackSpell.R == spell) ||
(a.Health <= AnnieCalcs.Ignite(a) && AttackSpell.Ignite == spell)
)).FirstOrDefault();
}
开发者ID:Sicryption,项目名称:EloBuddyAddons,代码行数:26,代码来源:AnnieFunctions.cs
示例8: GetEnemyKS
public static Obj_AI_Base GetEnemyKS(GameObjectType type, AttackSpell spell)
{
float range = 0;
if (spell == AttackSpell.Q)
range = Program.Q.Range;
else if (spell == AttackSpell.E)
range = Program.E.Range;
else if (spell == AttackSpell.W)
range = Program.W.Range;
else if (spell == AttackSpell.Ignite)
range = Program.Ignite.Range;
//ksing
return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).Where(a => a.IsEnemy
&& a.Type == type
&& a.Distance(Ryze) <= range
&& !a.IsDead
&& !a.IsInvulnerable
&& a.IsValidTarget(range)
&&
(
(a.Health <= RyzeCalcs.W(a) && AttackSpell.W == spell) ||
(a.Health <= RyzeCalcs.Q(a) && Program.Q.GetPrediction(a).HitChance >= HitChance.Low && AttackSpell.Q == spell) ||
(a.Health <= RyzeCalcs.E(a) && AttackSpell.E == spell) ||
(a.Health <= RyzeCalcs.Ignite(a) && AttackSpell.Ignite == spell)
)).FirstOrDefault();
}
开发者ID:Sicryption,项目名称:EloBuddyAddons,代码行数:26,代码来源:RyzeFuncs.cs
示例9: MinionWlh
private static Obj_AI_Base MinionWlh(GameObjectType type, AttackSpell spell)
{
return EntityManager.MinionsAndMonsters.EnemyMinions.OrderBy(a => a.Health).FirstOrDefault(a => a.IsEnemy
&&
a.Type ==
type
&&
a.Distance(
Kennen) <=
Program.W
.Range
&& !a.IsDead
&&
!a
.IsInvulnerable
&&
a
.IsValidTarget
(
Program
.W
.Range)
&&
a.Health <=
Misc.Wcalc(a));
}
开发者ID:globalik,项目名称:EloBuddy,代码行数:26,代码来源:LastHitA.cs
示例10: GetAlly
// Grab Ally
public static Obj_AI_Base GetAlly(float range, GameObjectType gametype)
{
return ObjectManager.Get<Obj_AI_Base>()
.OrderBy(a => a.Health).FirstOrDefault(a => a.IsAlly
&& a.Type == gametype && !Player.IsRecalling()
&& !a.IsDead && a.IsValidTarget(range) && !a.IsInvulnerable
&& a.Distance(Player) <= range);
}
开发者ID:CounterFX,项目名称:EloBuddy-Addons,代码行数:9,代码来源:Program.cs
示例11: GameObject
/// <summary>
/// Construct a game object and insert it into an object table.
/// </summary>
/// <param name="ObjectId">The engine object id.</param>
/// <param name="ObjectType">The object type code.</param>
/// <param name="ObjectManager">The object manager to attach the object
/// to.</param>
public GameObject(uint ObjectId, GameObjectType ObjectType, GameObjectManager ObjectManager)
{
this.GameObjectId = ObjectId;
this.GameObjectTypeCode = ObjectType;
this.ObjectManager = ObjectManager;
ObjectManager.AddGameObject(this);
}
开发者ID:CastanoALFA,项目名称:ALFA-Base-Resources,代码行数:15,代码来源:GameObject.cs
示例12: GetEnemy
public static Obj_AI_Base GetEnemy(float range, GameObjectType t)
{
switch (t)
{
default:
return EntityManager.Heroes.Enemies.OrderBy(a => a.Health).FirstOrDefault(
a => a.Distance(Player.Instance) < range && !a.IsDead && !a.IsInvulnerable);
}
}
开发者ID:Bloodimir,项目名称:EloBuddy,代码行数:9,代码来源:Program.cs
示例13: GameObject
/// <summary>
/// Creates an instance of a game object using the specified type and content.
/// </summary>
/// <param name="type">The type of game object to create.</param>
/// <param name="spriteContent">The image content to use for the game object's sprite.</param>
public GameObject(GameObjectType type, string spriteContent)
: this()
{
// Set the type of game object
Type = type;
// Initialize the sprite with the specified content
InitWithFile(spriteContent);
}
开发者ID:blueshirt13,项目名称:Cocos2D-XNA-Tutorials,代码行数:14,代码来源:GameObject.cs
示例14: GetEnemy
public static Obj_AI_Base GetEnemy(float range, GameObjectType type)
{
return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).Where(a => a.IsEnemy
&& a.Type == type
&& a.Distance(Annie) <= range
&& !a.IsDead
&& !a.IsInvulnerable
&& a.IsValidTarget(range)).FirstOrDefault();
}
开发者ID:Sicryption,项目名称:EloBuddyAddons,代码行数:9,代码来源:AnnieFunctions.cs
示例15: Projectile
public Projectile(Game game, Model model, Vector3 pos, Vector3 vel, GameObjectType targetType)
: base(game)
{
this.model = model;
this.pos = pos;
this.vel = vel;
this.targetType = targetType;
squareHitRadius = hitRadius * hitRadius;
}
开发者ID:Ox5f3759df,项目名称:SharpDX-Abstraction-Maria,代码行数:9,代码来源:Projectile.cs
示例16: GetGameObject
/// <summary>
/// Look up the internal GameObject for an object by object id and
/// return the C# object state for it, if the object type matched the
/// expected type.
///
/// The routine does not create the object state for an object id
/// that is valid but unrecognized to us (i.e. that we have not yet
/// seen even though it exists engine-side).
/// </summary>
/// <param name="ObjectId">Supplies the object id to look up.</param>
/// <param name="ObjectType">Supplies the required object type.</param>
/// <returns>The corresponding C# object state, else null.</returns>
public GameObject GetGameObject(uint ObjectId, GameObjectType ObjectType)
{
GameObject GameObj = GetGameObject(ObjectId);
if (GameObj == null || GameObj.ObjectType != ObjectType)
return null;
else
return GameObj;
}
开发者ID:ALandFarAway,项目名称:ALFA-Base-Resources,代码行数:21,代码来源:GameObjectManager.cs
示例17: Projectile
// Constructor.
public Projectile(LabGame game, MyModel myModel, Vector3 pos, Vector3 vel, GameObjectType targetType)
{
this.game = game;
this.myModel = myModel;
this.pos = pos;
this.vel = vel;
this.targetType = targetType;
squareHitRadius = hitRadius * hitRadius;
GetParamsFromModel();
}
开发者ID:georgecai904,项目名称:mazeball,代码行数:11,代码来源:Projectile.cs
示例18: GetKs
// Grab KSable Enemy
public static Obj_AI_Base GetKs(float range, float damage, GameObjectType gametype)
{
return ObjectManager.Get<Obj_AI_Base>()
.OrderBy(a => a.Health).FirstOrDefault(a => a.IsEnemy
&& a.Type == gametype
&& !a.IsDead && a.IsValidTarget(range) && !a.IsInvulnerable
&& !a.HasBuff("ChronoShift")
&& a.Health <= damage
&& a.Distance(Champion) <= range);
}
开发者ID:Sicryption,项目名称:EloBuddy-Addons,代码行数:11,代码来源:Program.cs
示例19: GetObject
public GameObject GetObject(GameObjectType type)
{
PoolList list = this.GetList(type);
if (list != null)
{
return list.GetNextAvaiableObject();
}
this._objectList.Add(new PoolList(type));
return this.GetObject(type);
}
开发者ID:SHEePYTaGGeRNeP,项目名称:FontysMobileGameJam,代码行数:11,代码来源:ObjectPool.cs
示例20: getLayer
public int getLayer(GameObjectType pType)
{
switch (pType)
{
case GameObjectType.virtualObject:return virtualObjectLayer;
break;
case GameObjectType.generalObject: return generalObjectLayer;
break;
}
throw new System.InvalidOperationException("Invalid GameObjectType");
return -1;
}
开发者ID:orange030,项目名称:modelPainter,代码行数:12,代码来源:GameConfig.cs
注:本文中的GameObjectType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论