Ejemplo n.º 1
0
    public new void Awake()
    {
        Config_ = new Roar.implementation.Config ();
        Logger logger = new Logger ();

        api = new MockRequestSender (Config_, this, logger);
        Roar.implementation.DataStore data_store = new Roar.implementation.DataStore (api, logger);
        WebAPI_ = new global::WebAPI (api);
        User_ = new Roar.implementation.Components.User (WebAPI_.user, data_store, logger);
        Properties_ = new Roar.implementation.Components.Properties (data_store);
        Inventory_ = new Roar.implementation.Components.Inventory (WebAPI_.items, data_store, logger);
        Shop_ = new Roar.implementation.Components.Shop (WebAPI_.shop, data_store, logger);
        Actions_ = new Roar.implementation.Components.Actions (WebAPI_.tasks, data_store);

        UrbanAirship_ = new Roar.implementation.Adapters.UrbanAirship (WebAPI_);

        // Apply public settings
        Config.game = gameKey;
    }
Ejemplo n.º 2
0
    public new void Awake()
    {
        config = new Roar.implementation.Config ();
        Logger logger = new Logger ();

        api = new MockRequestSender (config, this, logger);
        webAPI = new global::WebAPI(api);
        Roar.implementation.DataStore data_store = new Roar.implementation.DataStore (webAPI, logger);
        user = new Roar.implementation.Components.User (webAPI.user, data_store, logger);
        properties = new Roar.implementation.Components.Properties (data_store);
        inventory = new Roar.implementation.Components.Inventory (webAPI.items, data_store, logger);
        shop = new Roar.implementation.Components.Shop (webAPI.shop, data_store, logger);
        friends = new Roar.implementation.Components.Friends (webAPI.friends, data_store, logger);
        tasks = new Roar.implementation.Components.Tasks (webAPI.tasks, data_store);

        urbanAirship = new Roar.implementation.Adapters.UrbanAirship (webAPI);

        // Apply public settings
        // TODO: Not sure what this should be now.
        // Config.game = gameKey;
    }
Ejemplo n.º 3
0
    /**
     * Called by unity when everything is ready to go.
     * We use this rather than the constructor as its what unity suggests.
     */
    public void Awake()
    {
        config = new Roar.implementation.Config();

        // Apply public settings
        string key = gameKey.ToLower();
               //key = key.Replace("_", "");
        Config.Game = key;
        Config.IsDebug = debug;

        RequestSender api = new RequestSender(config,this,logger);
        webAPI = new global::WebAPI(api);
        datastore = new Roar.implementation.DataStore(webAPI, logger);
        friends = new Roar.implementation.Components.Friends( webAPI.friends, datastore, logger);
        user = new Roar.implementation.Components.User(webAPI.user,datastore, logger);
        properties = new Roar.implementation.Components.Properties( datastore );
        leaderboards = new Roar.implementation.Components.Leaderboards(webAPI,datastore, logger);
        inventory = new Roar.implementation.Components.Inventory( webAPI.items, datastore, logger);
        data = new Roar.implementation.Components.Data( webAPI.user, datastore, logger);
        shop = new Roar.implementation.Components.Shop( webAPI.shop, datastore, logger );
        tasks = new Roar.implementation.Components.Tasks( webAPI.tasks, datastore );
        facebook = new Roar.implementation.Components.Facebook(webAPI.facebook, datastore, logger);

        if (!Application.isEditor)
        {
            appstore = new Roar.implementation.Components.InAppPurchase( webAPI.appstore, "Roar", logger, appstoreSandbox );
        }

        urbanAirship = new Roar.implementation.Adapters.UrbanAirship(webAPI);

        DontDestroyOnLoad(gameObject);
    }
Ejemplo n.º 4
0
    /**
     * Called by unity when everything is ready to go.
     * We use this rather than the constructor as its what unity suggests.
     */
    public void Awake()
    {
        config = new Roar.implementation.Config();

        // Apply public settings
        string key = gameKey.ToLower();
               //key = key.Replace("_", "");
        Config.Game = key;
        Config.IsDebug = debug;

        switch (xmlParser)
        {
        case XMLType.System:
            IXMLNodeFactory.instance = new SystemXMLNodeFactory();
            break;
        case XMLType.Lightweight:
            IXMLNodeFactory.instance = new XMLNodeFactory();
            break;
        }

        RequestSender api = new RequestSender(config,this,logger);
        datastore = new Roar.implementation.DataStore(api, logger);
        webAPI = new global::WebAPI(api);
        user = new Roar.implementation.Components.User(webAPI.user,datastore, logger);
        properties = new Roar.implementation.Components.Properties( datastore );
        leaderboards = new Roar.implementation.Components.Leaderboards(datastore, logger);
        inventory = new Roar.implementation.Components.Inventory( webAPI.items, datastore, logger);
        shop = new Roar.implementation.Components.Shop( webAPI.shop, datastore, logger );
        actions = new Roar.implementation.Components.Actions( webAPI.tasks, datastore );

        if (!Application.isEditor)
        {
            appstore = new Roar.implementation.Components.InAppPurchase( webAPI.appstore, "Roar", logger, appstoreSandbox );
        }

        urbanAirship = new Roar.implementation.Adapters.UrbanAirship(webAPI);

        DontDestroyOnLoad(gameObject);
    }