Beispiel #1
0
        public void End()
        {
            if (fadeLevelStack.Count > 0)
            {
                throw new InvalidOperationException("Cannot end batch while still in fade block");
            }
            if (Camera == null)
            {
                throw new InvalidOperationException("Cannot end if not in batch");
            }

            Camera           = null;
            shadowCasterList = null;

            sb.End();
        }
Beispiel #2
0
        public void Begin(Camera camera, ShadowCasterList shadowCasterList)
        {
            if (fadeLevelStack.Count > 0)
            {
                throw new InvalidOperationException("Cannot begin batch while still in fade block");
            }
            if (Camera != null)
            {
                throw new InvalidOperationException("Cannot begin while already in batch");
            }

            Camera = camera;
            this.shadowCasterList = shadowCasterList;

            CommonBeginSpriteBatch();
        }