Skip to content
kmac0443 edited this page Feb 22, 2015 · 18 revisions

#Controller API

##Data Controllers These controllers receive calls from Unity (clicks, keys, etc) and react by making necessary changes to the Model. Together, these classes should contain access to all Models.

####Scene Model Controller Handles character collision with scene borders (changing scenes or outer boundaries).

class SceneModelController
{
    SceneModel model;

    // Loads new Scene into model based on location when hitting collider
    void OnCollisionWithBorder(Transform);
}

####Character Controller Handles character Model changes including inventory and meters

####Time Controller Handles changes in time and has a list of ITimeAffected Controllers to call every hour

####Interaction Controller Handles 'E' key press calls by checking area (colliders) for Interactable Environments (storage, trees, water, etc).

####NPC Controller Handles interaction between character and NPCs

##View Controllers These controllers listen for changes in the Model and react by informing Unity of necessary changes to the View.

####Character Movement Controller Handles changes to character position

####NPC Movement Controller Handles npc movement when not interacting with character

####Meter View Controller Shows changes to the meters from the Model in Unity

####Inventory View Controller Handles opening/closing inventory gui.

Clone this wiki locally