コード例 #1
0
ファイル: ArchonGame.cs プロジェクト: kyperbelt/Archon
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new ASpriteBatch(GraphicsDevice);

            archonCreate();
            // TODO: use this.Content to load your game content here
        }
コード例 #2
0
        public override void archonDraw(ASpriteBatch batch, float delta)
        {
            //elapased used to rotate region
            elapsed += delta * 100;
            //test region scrolling

            float rwidth  = 100;
            float rheight = 100;
            float rx      = ScreenWidth * .25f - rwidth / 2;
            float ry      = ScreenHeight / 2 - rheight / 2;


            //set sampler state to point clamp to disable aa
            batch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp);
            for (int i = 0; i < region.Length; i++)
            {
                batch.draw(region[i], rx + (rwidth * 3) * i + 20 * i, ry, rwidth, rheight, rwidth / 2, rheight / 2, 2, 2, MathHelper.ToRadians(elapsed));
            }
            batch.End();
        }
コード例 #3
0
ファイル: ArchonGame.cs プロジェクト: kyperbelt/Archon
 /**
  * archon rendering all logic and rendering is done in here
  * for now using a singular spritebatch but can switch this out
  * if limitations arise
  */
 public abstract void archonDraw(ASpriteBatch batch, float delta);