var Smallthing = Smallthing || {};

function Scene_initialize(ID)
{
    if(ID != null)
        this.ID = ID;
    
    if(this.onInit != null)
        this.onInit();
}

function Scene_finalize()
{
    if(this.onDestroy != null)
        this.onDestroy();
}

function Scene_update(dtime)
{
    if(this.onUpdate != null)
        this.onUpdate(dtime);
}

function Scene_set(_this)
{
    _this.initialize = Scene_initialize;
    _this.finalize = Scene_finalize;
    _this.update = Scene_update;
}