Exemplo n.º 1
0
    private void OnTriggerExit2D(Collider2D collision)
    {
        if (collision.CompareTag("FuelTank"))
        {
            onRange = false;
            fuelSliderGlow.SetActive(false);
        }

        else if (collision.CompareTag("WarehouseSlot"))
        {
            slot     = null;
            overSlot = false;
        }
    }
Exemplo n.º 2
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.CompareTag("FuelTank"))
        {
            onRange = true;

            if (playerShipStats.resourceWarehouse[itemIndex].name == "Fuel")
            {
                fuelSliderGlow.SetActive(true);
            }
        }

        else if (collision.CompareTag("WarehouseSlot"))
        {
            slot     = collision.gameObject.GetComponent <Scr_DragFuel>();
            overSlot = true;
        }
    }