public GEMenuItem(string id, GEText menuName, List <GEAction> actions, GERequirement requirements, SortedList <string, GEText> texts, bool?isActive, int?maxUseNumber) : this(id, menuName, actions) { this.requirements = requirements; this.texts = texts; this.maxUseNumber = maxUseNumber ?? 0; this.isActive = isActive ?? false; }
public GERequirement(GEText textOnFail, List <GEActivationChecker> activationChecks, List <GEPropertyChecker> propertyCehecks, List <GEEquippedChecker> equippedChecks) { this.textOnFail = textOnFail; this.activationChecks = activationChecks; this.propertyCehecks = propertyCehecks; this.equippedChecks = equippedChecks; }
public GEItem(string id, GEText itemName) : base(id) { menuItems = new SortedList <string, GEMenuItem>(); properties = new SortedList <string, GEProperty>(); texts = new SortedList <string, GEText>(); this.itemName = itemName; isEquipped = false; }
public GERoom(string id, GEText nameText, string imgPath) : base(id) { this.nameText = nameText; this.imgPath = imgPath; this.isActive = true; this.isCheckPoint = false; this.isVisited = false; }
public GEGameProperties(string firstRoomId, string defLang, GEText gameNameText, string menuImgSrc) { this.firstRoomId = firstRoomId; this.defLang = defLang; this.gameNameText = gameNameText; IsMenuSaveAvailable = true; this.checkpointsOn = false; this.menuImgSrc = menuImgSrc; }
public GEAction(GameElementManager elementManager, GEText responseText, List <GEActivation> activations, List <GEPropertySetter> propertySetters, GESaveAction saveAction, int useInterval) { this.elementManager = elementManager; this.responseText = responseText; this.activations = activations; this.propertySetters = propertySetters; this.useInterval = useInterval; this.saveAction = saveAction; }
public GEText GetTextElement(string id, bool log = true) { if (id == null) { return(GEText.GETextEmpty.Instance); } GEText ret = GetFromDic(texts, id, log); return(ret ?? GEText.GETextEmpty.Instance); }
public new GEText Execute() { foreach (GEEquipItem equipItem in equipItems) { equipItem.Execute(elementManager); } GEText response = base.Execute(); return(response); }
public GEMenuItem(string id, GEText menuName, List <GEAction> actions) : base(id) { this.menuName = menuName; this.actions = actions; actions.Sort((a1, a2) => { return(a1.UseInterval - a2.UseInterval); }); isActive = true; maxUseNumber = 0; //infinit representations ActionCounter = 0; }
public string GetText(string id, string lang, bool log = true) { GEText text = GetTextElement(id); if (text == null || text.IsEmpty()) { if (log) { ObjectManager.Logger.LogWarn("There is no GEText with the given id! " + id); //throw new Exception(String.Format("There is no text with the given id! id: {0}", id)); } return(null); } return(text.GetText(lang, log)); }
public GEText AddText(string id, string txt, string lang) { GEText text = GetTextElement(id, false); if (text == null || text.IsEmpty()) { text = new GEText(id, defLang, lang, txt); AddTextElement(text); } else { text.AddText(lang, txt); } if (!AvailableLangs.Contains(lang)) { AvailableLangs.Add(lang); } return(text); }
public GEText Execute() { foreach (GEActivation activation in activations) { activation.Execute(elementManager); } foreach (GEPropertySetter propSetter in propertySetters) { propSetter.Execute(elementManager); } if (saveAction != null) { saveAction.Execute(); } if (responseText == null) { responseText = GEText.GETextEmpty.Instance; } return(responseText); }
public GEProperty(string id, GEText name) : base(id) { this.name = name; this.defValue = 0f; this.value = 0f; }
public void AddTextElement(GEText text) { AddToDic(texts, text); }
public GEItemAction(GameElementManager elementManager, GEText responseText, List <GEActivation> activations, List <GEPropertySetter> propertySetters, GESaveAction saveAction, List <GEEquipItem> equipItems, int useInterval) : base(elementManager, responseText, activations, propertySetters, saveAction, useInterval) { this.equipItems = equipItems; }
public GEProperty(string id, GEText name, double defValue, double minValue, double?maxValue) : this(id, name, defValue) { this.minValue = minValue; this.maxValue = maxValue; }
public GEProperty(string id, GEText name, double defValue) : base(id) { this.name = name; this.defValue = defValue; this.value = defValue; }
public GEItem(string id, GEText itemName, bool isActive, bool equipable, GEText description) : this(id, itemName) { this.isActive = isActive; this.equipable = equipable; this.description = description; }
public GERoom(string id, GEText nameText, string imgPath, GEText descText, bool isActive, bool isCheckpoint) : this(id, nameText, imgPath) { this.descText = descText; this.isActive = isActive; this.isCheckPoint = isCheckpoint; }
public GEGameProperties(string firstRoomId, string defLang, GEText gameNameText, string menuImgPath, GEText greetingText, bool isMenuSaveAvailable, bool checkpointsOn) : this(firstRoomId, defLang, gameNameText, menuImgPath) { this.greetingText = greetingText; this.checkpointsOn = checkpointsOn; IsMenuSaveAvailable = isMenuSaveAvailable; }