public override bool CollideWithBB(BBCollider c) { var other = c.Location; var otherD = c.Dimensions; if ((Location.X + Dimensions.X) < other.X || Location.X > (other.X + otherD.X) || (Location.Y + Dimensions.Y) < other.Y || Location.Y > (other.Y + otherD.Y)) { return(false); } return(true); }
public BaseActor(Vector2d loc, Direction facing, IController ai) : base(loc, facing) { Collider = new BBCollider(2, 3); Control = ai; Control.Controlled = this; Target = null; Mass = 50.0; Hits = MaxHits = 100; Vulnerable = true; MaxVel = 10; Hits = MaxHits = 100; //Weapons[0] = new BaseWeapon(0, 2, weaponpoints, ShotMode.CYCLE); }
public BaseObj(Vector2d loc, Direction facing) { Loc = loc; OldLoc = loc; Facing = facing; Id = Misc.GetID(); Collider = new BBCollider(loc, 5, 5); Sprite = Loader.GetSprite("player.sprite"); Mass = 100.0; Hits = 100; DragAmount = 0; MaxHits = Hits; Vulnerable = true; Shootable = true; Impactable = true; Floating = false; TouchingGround = false; EffectRange = 10; }
public virtual bool CollideWithBB(BBCollider c) { return(false); }