Example #1
0
 public ForceField(EntityPrototype proto, Player owner, Vector2 offset, ForceFieldGadget gadget) : base(proto)
 {
     this.owner           = owner;
     this.gadget          = gadget;
     ownerOffset          = offset;
     mMovingSpeed         = 0;
     Body.mIgnoresGravity = true;
     shieldBox            = new Blockbox(this, new CustomAABB(Position, proto.bodySize, new Vector2(0, proto.bodySize.y)));
     shieldBox.UpdatePosition();
 }
Example #2
0
 public override void SecondUpdate()
 {
     base.SecondUpdate();
     Position = owner.Position;
     shieldBox.UpdatePosition();
 }