// Use this for initialization void Start() { Block block = new Block(blockType, Vector3.zero); BlockRenderer blockRenderer = gameObject.GetComponent <BlockRenderer>(); if (drawCombined) { blockRenderer.DrawCombined(block, cubeMaterial); } else { blockRenderer.Draw(block, cubeMaterial); } }
private void BattlefieldForm_Paint(object sender, PaintEventArgs e) { e.Graphics.Clear(Color.LightGray); renderer.Draw(e.Graphics); }