예제 #1
0
파일: HexMap.cs 프로젝트: z3t4/YEBOIEDITOR
    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;
        }
    }
예제 #2
0
 public void setBrushState(int idstate)
 {
     this.cursorType = CursorType.Brush;
     this.state      = (HexField.FieldType)idstate;
 }