コード例 #1
0
        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);
        }
コード例 #2
0
        public GateHit GenerateGateHit(float height, IItem item)
        {
            var hit = new GateHit(_gateData, height, item)
            {
                TwoWay     = _gateData.TwoWay,
                FireEvents = true,
                IsEnabled  = _gateData.IsCollidable
            };

            return(hit);
        }
コード例 #3
0
        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);
        }