예제 #1
0
    // IMPLEMENTATION METHODS

    private void Init()
    {
        // instantiate datastores
        this.assetData          = new AssetData();
        this.kittyData          = new KittyData();
        this.accessoryData      = new AccessoryData();
        this.kittyAccessoryData = new KittyAccessoryData();
        this.mazeProgressData   = new MazeProgressData();
        // execute data startup processes
        this.dataStartup = new DataStartup();
        this.dataStartup.ExecuteStartupProcesses();
        // instantiate unity events object
        this.unityEvents = new UnityEvents();
        // instantiate admin control object
        this.adminControl = new AdminControl();
    }
예제 #2
0
    // SERVICE FOR KITTY -> ACCESSORY RELATIONSHIPS


    public static KittyAccessoryModel GetModelByKittyAndAccessoryCombination(
        KittyModel kittyModel,
        AccessoryModel accessoryModel
        )
    {
        KittyAccessoryData kittyAccessoryData = GameManager.instance.kittyAccessoryData;
        string             key = kittyAccessoryData.GetFormattedKeyFromKittyAndAccessoryCombination(
            kittyModel,
            accessoryModel
            );
        var keyToModel = kittyAccessoryData.GetKeyToModel();

        if (keyToModel.ContainsKey(key))
        {
            return(keyToModel[key]);
        }
        return(null);
    }