static void PaintCaseB() { // 赤色 string[] reds = new string[] { "Cubes/キューブ1x2", "Cubes/キューブ1x3", "Cubes/キューブ2x3", }; // 青色 string[] blues = new string[] { "Cubes/キューブ2x1", "Cubes/キューブ3x1", "Cubes/キューブ3x2", }; Material redMtl = ResourceManager.GetMaterial(ResourceManager.nd_red_name); Material blueMtl = ResourceManager.GetMaterial(ResourceManager.nd_blue_name); foreach (string cubeName in reds) { GameObjectCreator.PaintGameObject(cubeName, redMtl); } foreach (string cubeName in blues) { GameObjectCreator.PaintGameObject(cubeName, blueMtl); } }
static void PaintRightBottomWingBlue() { Material mtl = ResourceManager.GetMaterial(ResourceManager.nd_blue_name); string[] names = GetCubeNames("right_bottom_wing"); foreach (string name in names) { GameObjectCreator.PaintGameObject(name, mtl); } }
static void PaintLeftTopWingRed() { Material mtl = ResourceManager.GetMaterial(ResourceManager.nd_red_name); string[] names = GetCubeNames("left_top_wing"); foreach (string name in names) { GameObjectCreator.PaintGameObject(name, mtl); } }
static void PaintAllWhite() { Material mtl = ResourceManager.GetMaterial(ResourceManager.nd_white_name); string[] names = GetCubeNames("all"); foreach (string name in names) { GameObjectCreator.PaintGameObject(name, mtl); } }
static void PaintDiagonal() { Material mtl = ResourceManager.GetMaterial(ResourceManager.nd_red_name); string[] names = GetCubeNames("square"); foreach (string name in names) { GameObjectCreator.PaintGameObject(name, mtl); } }
static void PaintCaseA() { /* * // 例 * string[] names = new string[] * { * "Cubes/キューブ2x6", * "Cubes/キューブ2x7", * "Cubes/キューブ2x8", * "Cubes/キューブ2x9", * "Cubes/キューブ3x7", * "Cubes/キューブ5x5", * "Cubes/キューブ7x4", * "Cubes/キューブ8x4", * "Cubes/キューブ9x4", * "Cubes/キューブ10x4", * }; */ //* // 例 平方数 string[] names = new string[] { "Cubes/キューブ1x1", "Cubes/キューブ2x2", "Cubes/キューブ3x3", "Cubes/キューブ4x4", "Cubes/キューブ5x5", "Cubes/キューブ6x6", "Cubes/キューブ7x7", "Cubes/キューブ8x8", "Cubes/キューブ9x9", "Cubes/キューブ10x10", }; // */ /* * // 例 上の方の平方数の近く * string[] names = new string[] * { * "Cubes/キューブ6x5", * "Cubes/キューブ6x6", * "Cubes/キューブ7x6", * "Cubes/キューブ7x7", * "Cubes/キューブ8x7", * "Cubes/キューブ8x8", * "Cubes/キューブ9x8", * "Cubes/キューブ9x9", * "Cubes/キューブ10x9", * "Cubes/キューブ10x10", * }; */ /* * // 例 素数 * string[] names = new string[] * { * "Cubes/キューブ1x2", * "Cubes/キューブ1x3", * "Cubes/キューブ1x5", * "Cubes/キューブ1x7", * "Cubes/キューブ2x1", * "Cubes/キューブ3x1", * "Cubes/キューブ5x1", * "Cubes/キューブ7x1", * }; */ string namePath = string.Format("{0}/{1}", ResourceManager.nd_materials, ResourceManager.nd_red_name); Material mtl = Resources.Load <Material>(namePath); Debug.Assert(null != mtl, string.Format("path={0} Redマテリアル作ってないだろ☆(^~^)", namePath)); foreach (string name in names) { GameObjectCreator.PaintGameObject(name, mtl); } }