vendredi 30 octobre 2015

How to call function from a member class?

How to call function(AddUnit) from a member class(menu)? Or how to organise this code?:

class Base
{
    BaseMenu *menu;
    virtual void AddUnit(Unit* unit);
}

I writing something like stategy or tactic game. Menu has buttons and I want to add units by clicking on this buttons. How to organise this or How to make different menu for different bases? Maybe out menu from base class ?

Aucun commentaire:

Enregistrer un commentaire