Exemple #1
0
    // Methods ////////////////////////////////////////////////////////////////////////////////////

    public static BoatShopping GetInstance()
    {
        if (StateInstance == null)
        {
            StateInstance = new BoatShopping();
        }
        return(StateInstance);
    }
    //---------------------------------------------------------------------------------------------

    public override void StateUpdate(StateManager stateManager)
    {
        if (stateManager.CurrentPlayer().CrossedInitialTile)
        {
            stateManager.currentState = BoatShopping.GetInstance();
            stateManager.boatShop.GetComponent <BoatShop>().ShowDialog
            (
                String.Format
                (
                    LangManager.GetTranslation("boat_shop_text"),
                    Definitions.CANTIDAD_A_RECIBIR_SALIDA
                )
            );
            stateManager.CurrentPlayer().CrossedInitialTile = false;
        }
        else
        {
            stateManager.NewTurn();
        }
    }