public ItemizeDownloadLanguagesDelegate(
     ILanguageController languageController,
     IReplaceMultipleDelegate <string> replaceMultipleStringsDelegate)
 {
     this.languageController             = languageController;
     this.replaceMultipleStringsDelegate = replaceMultipleStringsDelegate;
 }
示例#2
0
        public GetDeserializedGameDetailsAsyncDelegate(
            IGetResourceAsyncDelegate getResourceAsyncDelegate,
            ISerializationController <string> serializationController,
            ILanguageController languageController,
            IFormatDelegate <string, string> formatDownloadLanguageDelegate,
            IConfirmDelegate <string> confirmStringContainsLanguageDownloadsDelegate,
            IItemizeDelegate <string, string> itemizeDownloadLanguagesDelegate,
            IItemizeDelegate <string, string> itemizeGameDetailsDownloadsDelegate,
            IReplaceMultipleDelegate <string> replaceMultipleStringsDelegate,
            IConvertDelegate <
                OperatingSystemsDownloads[][],
                OperatingSystemsDownloads[]> convert2DArrayToArrayDelegate,
            ICollectionController collectionController)
        {
            this.getResourceAsyncDelegate       = getResourceAsyncDelegate;
            this.serializationController        = serializationController;
            this.languageController             = languageController;
            this.formatDownloadLanguageDelegate = formatDownloadLanguageDelegate;

            this.confirmStringContainsLanguageDownloadsDelegate = confirmStringContainsLanguageDownloadsDelegate;
            this.itemizeDownloadLanguagesDelegate    = itemizeDownloadLanguagesDelegate;
            this.itemizeGameDetailsDownloadsDelegate = itemizeGameDetailsDownloadsDelegate;
            this.replaceMultipleStringsDelegate      = replaceMultipleStringsDelegate;
            this.convert2DArrayToArrayDelegate       = convert2DArrayToArrayDelegate;
            this.collectionController = collectionController;
        }
	void Start () {
		if (target_image == null)
			target_image = GetComponent<Image> ();
		if (default_sprite == null)
			default_sprite = target_image.sprite;
		if (controller == null)
			controller = LanguageController.controller;
		subscription = controller.rx_current_language_key.Subscribe ((string lang) => {
			if (images.ContainsKey(lang)){
				target_image.sprite = images[lang];
			} else {
				target_image.sprite = default_sprite;
			}
		});
	}
	void Start(){
		if (ui_texts.Count == 0)
			ui_texts.AddRange(GetComponents<Text>());
		if (mesh_texts.Count == 0)
			mesh_texts.AddRange(GetComponents<TextMesh>());
		//Stopgap solution until I can get dependency injection working.
		if (controller == null){
			controller = LanguageController.controller;
		}
		rx_value = controller.rx_get_language_label(rx_language);
		sub = rx_value.Subscribe((t)=>{
			foreach(Text ui in ui_texts){
				if (ui != null){
					ui.text = t;
				}
			}
			foreach(TextMesh mesh in mesh_texts){
				if (mesh != null){
					mesh.text = t;
				}
			}
		});
	}
	void Start(){
		if (ui_texts.Count == 0)
			ui_texts.AddRange(GetComponents<Text>());
		if (mesh_texts.Count == 0)
			mesh_texts.AddRange(GetComponents<TextMesh>());
		//Stopgap solution until I can get dependency injection working.
		if (controller == null){
			controller = LanguageController.controller;
		}
		rx_value = controller.rx_load_text(rx_key);
		subscription = rx_value.Subscribe((t)=>{
			string full_text = prefix + t + suffix;
			foreach(Text ui in ui_texts){
				if (ui != null){
					ui.text = full_text;
				}
			}
			foreach(TextMesh mesh in mesh_texts){
				if (mesh != null){
					mesh.text = full_text;
				}
			}
		});
	}
 public CorrectSettingsDownloadsLanguagesAsyncDelegate(ILanguageController languageController)
 {
     this.languageController = languageController;
 }