private int OnQueryUsable(QueryUsable e) { e.pm.message = QueryPM.message; e.pm.font = QueryPM.font; e.usableObject = true; e.gameObject = gameObject; return(0); }
private void OnTriggerEnter2D(Collider2D collision) { Debug.Log("OnTrigger Entered 2d"); QueryUsable qu = new QueryUsable(); FFMessageBoard <QueryUsable> .Send(qu, collision.gameObject); if (qu.usableObject) { SelectUsableObject(qu); DisplayUsableObjectMessage(qu); } else { DeselectUsableObject(qu.gameObject); } }
void DisplayUsableObjectMessage(QueryUsable qu) { UpdatePlayerMessage(qu.pm); }
void SelectUsableObject(QueryUsable qu) { selectedObject = qu.gameObject; }