Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
 public static bool IsSelf(VEntity a)
 {
     return(a == VPlayer.instance);
 }
Esempio n. 4
0
 public static bool IsEffect(VEntity a)
 {
     return((a.flag | EntityFlag.Effect) > 0);
 }
Esempio n. 5
0
 public static bool IsItem(VEntity a)
 {
     return((a.flag | EntityFlag.Item) > 0);
 }
Esempio n. 6
0
 public static bool IsStructure(VEntity a)
 {
     return((a.flag | EntityFlag.Structure) > 0);
 }
Esempio n. 7
0
 public static bool IsMissile(VEntity a)
 {
     return((a.flag | EntityFlag.Missile) > 0);
 }
Esempio n. 8
0
 public static bool IsSmallPrtatp(VEntity a)
 {
     return((a.flag | EntityFlag.SmallPotato) > 0);
 }
Esempio n. 9
0
 public static bool IsHero(VEntity a)
 {
     return((a.flag | EntityFlag.Hero) > 0);
 }
Esempio n. 10
0
 private void SetDocked(VEntity docked)
 {
     this.SetupTerritory(this.GetDockedPosition(docked, this.spare), docked.direction);
 }