void Awake()
    {
        instance = this;

        isLocked = false;

        // Lock transport controls when landinng on planet (can only be unlocked once the Terraformer is done)
        if (SceneManager.GetActiveScene().name == "Level_Planet")
        {
            //LockControls(true);

            // The PreFab for the Transporter only contains the Click Handler if it is on the Planet!
            status_indicator = GetComponent<Building_Handler>().buildingStatusIndicator;
        }
    }
    void Awake()
    {
        instance = this;

        build_statusIndicator = GetComponent<Building_Handler>().buildingStatusIndicator;
    }
    // This is the Initializer for Storage Units
    public void InitStorageUnit(int storageCap, Transform _trans, Action<TileData.Types, int> _callback)
    {
        extractorStats = new ExtractorStats(storageCap);
        myTransform = _trans;
        callback = _callback;

        resource_grid = ResourceGrid.Grid;
        b_statusIndicator = GetComponent<Building_Handler>().buildingStatusIndicator;

        // all storage units require an empty material since they can take any
        requiredMaterial = TileData.Types.empty;
    }
    // this Initializer works for buildings that extract from another building to produce their OWN resource
    public void InitSelfProducer(TileData.Types productType, float rate, int ammnt, int storageCap, int secondStorageCap, int matConsumed, TileData.Types requiredMat,Transform _trans)
    {
        extractorStats = new ExtractorStats(rate, ammnt, storageCap, secondStorageCap, matConsumed);
        resourceType = productType;
        myTransform = _trans;

        resource_grid = ResourceGrid.Grid;
        b_statusIndicator = GetComponent<Building_Handler>().buildingStatusIndicator;

        requiredMaterial = requiredMat;
    }
    // INITIALIZERS:
    public void Init(TileData.Types r_type, float rate, float power, int ammnt, int storageCap, Transform _trans)
    {
        extractorStats = new ExtractorStats(rate, ammnt, power, storageCap);
        resourceType = r_type;
        myTransform = _trans;

        resource_grid = ResourceGrid.Grid;

        b_statusIndicator = GetComponent<Building_Handler>().buildingStatusIndicator;
    }
    void Start()
    {
        if (buildingStatusIndicator == null)
            buildingStatusIndicator = GetComponent<Building_Handler> ().buildingStatusIndicator;

        // In case Building UI is null
        if (buildingUI == null) {
            buildingUI = GameObject.FindGameObjectWithTag ("UI").GetComponent<Building_UIHandler> ();
        }

        // In case Player Resources is null
        if (playerResources == null) {
            playerResources = GameObject.FindGameObjectWithTag("Capital").GetComponent<Player_ResourceManager>();
        }

        // Store the Sprite Renderer for layer management
        sr = GetComponent<SpriteRenderer> ();
    }