Esempio n. 1
0
    private void OnTriggerStay(Collider other)
    {
        HeatSensitive sensitive = other.GetComponent <HeatSensitive>();
        HeatSource    source    = other.GetComponent <HeatSource>();

        if (sensitive != null)
        {
        }
        if (source != null)
        {
        }
    }
Esempio n. 2
0
    public float HeatTransferFrom(HeatSensitive sensitive)
    {
        float Q = 0;

        if (Temperature > sensitive.Temperature)
        {
            Q = HeatTransfer(Temperature, sensitive.Temperature);
        }
        else if (sensitive.Temperature > Temperature)
        {
            Q = HeatTransfer(sensitive.Temperature, Temperature);
        }

        return(Q);
    }
Esempio n. 3
0
    // Use this for initialization
    void Start()
    {
        Heat = gameObject.GetComponent <HeatSensitive>();

        if (Heat == null)
        {
            Debug.LogError("GameObject must have a HeatSensitive Component");
        }

        gameObject.GetComponent <Renderer>().material = RawMaterial;

        InvokeRepeating("Cook", 1.0f, 1.0f);

        InvokeRepeating("SetTemperature", 1.0f, 1.0f);
    }