Ejemplo n.º 1
0
    // ------------- Placeholder Control -------------

    void SpawnInvalid()
    {
        if (!SpawnedPlaceholder)
        {
            return;
        }

        Destroy(this.Placeholder_Placement);
        this.Placeholder_Placement = Instantiate(this.Selected_Building.InvalidBuildObject);
        this.Placeholder_Placement.transform.parent = this.BuildCursor;
        this.Placeholder_Placement_Script           = this.Placeholder_Placement.gameObject.GetComponent <BuildingPlaceholder>();
        SpawnedPlaceholder = false;
    }
Ejemplo n.º 2
0
    void SpawnValid()
    {
        if (SpawnedPlaceholder)
        {
            return;
        }

        if (this.Placeholder_Placement != null)
        {
            Destroy(this.Placeholder_Placement);
        }

        this.Placeholder_Placement = Instantiate(this.Selected_Building.PlaceHolder);
        this.Placeholder_Placement.transform.parent = this.BuildCursor;
        this.Placeholder_Placement_Script           = this.Placeholder_Placement.gameObject.GetComponent <BuildingPlaceholder>();
        SpawnedPlaceholder = true;
    }