Example #1
0
    public void Test_BuyConstruct(Construct construct)
    {
        mapEditor.CancelPlacement();
        if (construct.constructType == ConstructType.Ground)
        {
            construct_temp = mapBuilder.GenerateConstruct(construct, new Vector3(0, -10, 0), new ConstructData(), groundRoot);
        }
        else if (construct.constructType == ConstructType.Wall)
        {
            construct_temp = mapBuilder.GenerateConstruct(construct, new Vector3(0, 20, 0), new ConstructData(), wallRoot);
        }
        else if (construct.constructType == ConstructType.Furniture)
        {
            construct_temp = mapBuilder.GenerateConstruct(construct, new Vector3(0, 20, 0), new ConstructData(), furnitureRoot);
        }
        else if (construct.constructType == ConstructType.Relax)
        {
            construct_temp = mapBuilder.GenerateConstruct(construct, new Vector3(0, 20, 0), new ConstructData(), relaxRoot);
        }
        else if (construct.constructType == ConstructType.Work)
        {
            construct_temp = mapBuilder.GenerateConstruct(construct, new Vector3(0, 20, 0), new ConstructData(), workRoot);
        }

        if (construct_temp == null)
        {
            return;
        }

        SetSelectConstruct(construct_temp);
    }