public SandwitchBuilder WithType(TypeWall typeWall)
        {
            outSandwitch.TypeWall = typeWall;
            switch (typeWall)
            {
            case TypeWall.ExternalNotInsulated:
            case TypeWall.InteriorNotInsulated:
                outSandwitch.MyStyle = null;
                break;

            case TypeWall.ExternalInsulated:
            case TypeWall.InteriorInsulated:
                if (typeWall == TypeWall.InteriorInsulated)
                {
                    outSandwitch.ParentEl.MouseDown += outSandwitch.ChangeViewWall;
                }
                else
                {
                    outSandwitch.ParentEl.MouseDown += outSandwitch.ShowMenuAddElement;
                }

                outSandwitch.MyStyle = (Style)Application.Current.FindResource("PanelWallStyle");
                break;
            }
            return(this);
        }
Ejemplo n.º 2
0
 internal void SetType(TypeWall typeWall)
 {
     Left.Type  = typeWall;
     Right.Type = typeWall;
     Up.Type    = typeWall;
     Down.Type  = typeWall;
 }
Ejemplo n.º 3
0
    public void ChangeWall(Direction direction, GameObject wall, TypeWall type)
    {
        switch (direction)
        {
        case Direction.Left:
        {
            ClearChildrens(this.walls.Left.Point);
            if (wall)
            {
                Instantiate(wall, this.walls.Left.Point);
            }
            this.walls.Left.Type = type;
        }
        break;

        case Direction.Right:
        {
            ClearChildrens(this.walls.Right.Point);
            if (wall)
            {
                Instantiate(wall, this.walls.Right.Point);
            }
            this.walls.Right.Type = type;
        }
        break;

        case Direction.Up:
        {
            ClearChildrens(this.walls.Up.Point);
            if (wall)
            {
                Instantiate(wall, this.walls.Up.Point);
            }
            this.walls.Up.Type = type;
        }
        break;

        case Direction.Down:
        {
            ClearChildrens(this.walls.Down.Point);
            if (wall)
            {
                Instantiate(wall, this.walls.Down.Point);
            }
            this.walls.Down.Type = type;
        }
        break;
        }
        ShowPillars(direction);
    }
Ejemplo n.º 4
0
    GameObject GetWall(TypeWall type)
    {
        switch (type)
        {
        case TypeWall.Null: return(null);

        case TypeWall.Passage: return(Passage.Prefab);

        case TypeWall.Door: return(Door.Prefab);

        case TypeWall.Wall: return(Wall);

        default: return(null);
        }
    }
Ejemplo n.º 5
0
 public Expr(string expression)
 {
     ExprString = expression;
     Wall = new TypeWall(expression);
 }