Specimen.Components.CShadower.Update C# (CSharp) Method

Update() public method

public Update ( float mFrameTime ) : void
mFrameTime float
return void
        public override void Update(float mFrameTime)
        {
            _vertexArrays.Clear();
            var hulls = Manager.GetEntitiesByTag(Tags.Wall).Select(x => x.GetComponentUnSafe<CBody>()).Select(y => new AABBHull(y.Position, y.HalfSize));
            ShadowCaster.Position = _cBody.Position;
            ShadowCaster.CalculateShadows(hulls);

            if (!_isDrawn) return;

            foreach (var polygon in ShadowCaster.Polygons)
                _vertexArrays.Add(polygon.GetVertexArray(1f/SPUtils.Divisor, _color));
        }