Exemplo n.º 1
0
 void OnEditmode(WorldCreator.EditingType type)
 {
     if (type == WorldCreator.EditingType.NONE)
     {
         foreach (EditableWorldObject t in editingObjects)
         {
             t.gameObject.SetActive(false);
         }
     }
     else
     {
         foreach (EditableWorldObject t in editingObjects)
         {
             if (
                 (type == WorldCreator.EditingType.FLOORS && t.name == "floor_corner")
                 ||
                 (type == WorldCreator.EditingType.WALLS && t.name == "floor_corner")
                 )
             {
                 t.gameObject.SetActive(true);
             }
             else
             {
                 t.gameObject.SetActive(false);
             }
         }
     }
     OnEditModeDone(type);
 }
Exemplo n.º 2
0
 public override void OnEditModeDone(WorldCreator.EditingType type)
 {
     foreach (WorldPlane plane in planes)
     {
         plane.SwitchMode(type);
     }
 }
Exemplo n.º 3
0
    void OnEditmode(WorldCreator.EditingType type)
    {
        Material mat = null;

        switch (type)
        {
        case WorldCreator.EditingType.FLOORS: mat = World.Instance.creator.editingFloorMaterial; break;

        case WorldCreator.EditingType.WALLS: mat = World.Instance.creator.editingWallMaterial; break;
        }
        foreach (EditableWorldObject t in editingObjects)
        {
            t.GetComponent <MeshRenderer>().material = mat;
        }
    }
Exemplo n.º 4
0
    public void SwitchMode(WorldCreator.EditingType type)
    {
        switch (type)
        {
        case WorldCreator.EditingType.NONE:
            inPlane.enabled   = true;
            outPlane.material = material;
            break;

        case WorldCreator.EditingType.FLOORS:
            inPlane.enabled   = false;
            outPlane.material = editingMaterialFloor;
            break;

        case WorldCreator.EditingType.WALLS:
            inPlane.enabled   = false;
            outPlane.material = editingMaterialWalls;
            break;
        }
    }
Exemplo n.º 5
0
 public virtual void OnEditModeDone(WorldCreator.EditingType type)
 {
 }