public static void textureGameObject(GameObject obj, HexField.FieldType type) { switch (type) { case HexField.FieldType.Grass: obj.GetComponent <Renderer>().material = (Material)Resources.Load("Materials/Fields/Grass"); break; case HexField.FieldType.Water: obj.GetComponent <Renderer>().material = (Material)Resources.Load("Materials/Fields/Water"); break; case HexField.FieldType.Mountain: obj.GetComponent <Renderer>().material = (Material)Resources.Load("Materials/Fields/Mountain"); break; case HexField.FieldType.Dirt: obj.GetComponent <Renderer>().material = (Material)Resources.Load("Materials/Fields/Dirt"); break; } }
public void setBrushState(int idstate) { this.cursorType = CursorType.Brush; this.state = (HexField.FieldType)idstate; }