public void Init(Table.Table table) { var height = table.GetSurfaceHeight(Data.Surface, Data.Center.X, Data.Center.Y); var radAngle = MathF.DegToRad(Data.Rotation); var tangent = new Vertex2D(MathF.Cos(radAngle), MathF.Sin(radAngle)); _hitGate = _hitGenerator.GenerateGateHit(height, this); _hitLines = _hitGenerator.GenerateLineSegs(height, tangent, this); _hitCircles = _hitGenerator.GenerateBracketHits(height, tangent, this); }
public GateHit GenerateGateHit(float height, IItem item) { var hit = new GateHit(_gateData, height, item) { TwoWay = _gateData.TwoWay, FireEvents = true, IsEnabled = _gateData.IsCollidable }; return(hit); }
public GateHit GenerateGateHit(EventProxy events, float height) { var hit = new GateHit(_gateData, height) { TwoWay = _gateData.TwoWay, Obj = events, FireEvents = true, IsEnabled = _gateData.IsCollidable }; return(hit); }