public Vector3 GetDockedPosition(VEntity docked, Spare part) { Vector3 p; switch (part) { case Spare.Overhead: p = docked.graphic.spare.overheadPos; break; case Spare.HitPoint: p = docked.graphic.spare.hitPointPos; break; case Spare.LHand: p = docked.graphic.spare.lHandPos; break; case Spare.RHand: p = docked.graphic.spare.rHandPos; break; case Spare.LFoot: p = docked.graphic.spare.lFootPos; break; case Spare.RFoot: p = docked.graphic.spare.rFootPos; break; case Spare.HeadNub: p = docked.graphic.spare.headNubPos; break; case Spare.Weapon0: p = docked.graphic.spare.weapon0Pos; break; case Spare.Weapon1: p = docked.graphic.spare.weapon1Pos; break; default: p = docked.graphic.spare.footholdPos; break; } return(p); }
public void SetupTerritory(VEntity caster, VEntity target, Vector3 targetPoint) { switch (this.positionType) { case EffectPositionType.DockedToCaster: this.SetDocked(caster); break; case EffectPositionType.DockedToTarget: if (target != null) { this.SetDocked(target); } else { this.SetupTerritory(targetPoint, caster.direction); } break; case EffectPositionType.FollowCaster: this.followedTarget = caster; this.followedTarget.AddRef(); this.SetDocked(caster); break; case EffectPositionType.FollowTarget: this.followedTarget = target; this.followedTarget.AddRef(); if (target != null) { this.SetDocked(target); } else { this.SetupTerritory(targetPoint, caster.direction); } break; } this.graphic.electric.target = target; }
public static bool IsSelf(VEntity a) { return(a == VPlayer.instance); }
public static bool IsEffect(VEntity a) { return((a.flag | EntityFlag.Effect) > 0); }
public static bool IsItem(VEntity a) { return((a.flag | EntityFlag.Item) > 0); }
public static bool IsStructure(VEntity a) { return((a.flag | EntityFlag.Structure) > 0); }
public static bool IsMissile(VEntity a) { return((a.flag | EntityFlag.Missile) > 0); }
public static bool IsSmallPrtatp(VEntity a) { return((a.flag | EntityFlag.SmallPotato) > 0); }
public static bool IsHero(VEntity a) { return((a.flag | EntityFlag.Hero) > 0); }
private void SetDocked(VEntity docked) { this.SetupTerritory(this.GetDockedPosition(docked, this.spare), docked.direction); }