public bool Initialize(PropSettings settings) { this.settings = settings; isInitialized = true; return(isInitialized); }
public static void Load(Microsoft.Xna.Framework.Content.ContentManager p_loader) { JKContentManager.Props.SilverCoin = JKContentManager.Props.LoadCustomWorldItem(p_loader, "silver_coin"); JKContentManager.Props.GiantBootsWorldItem = JKContentManager.Props.LoadCustomWorldItem(p_loader, "shoes_iron"); JKContentManager.Props.GnomeHatWorldItem = JKContentManager.Props.LoadCustomWorldItem(p_loader, "gnome_hat"); JKContentManager.Props.TunicWorldItem = JKContentManager.Props.LoadCustomWorldItem(p_loader, "tunic"); JKContentManager.Props.YellowShoesWorldItem = JKContentManager.Props.LoadCustomWorldItem(p_loader, "yellow_shoes"); JKContentManager.Props.CapWorldItem = JKContentManager.Props.LoadCustomWorldItem(p_loader, "cap"); JKContentManager.Props.ShroomWorldItem = JKContentManager.Props.LoadCustomWorldItem(p_loader, "shroom"); JKContentManager.Props.GhostFragmentItem = JKContentManager.Props.LoadCustomWorldItem(p_loader, "ghost_fragment"); JKContentManager.Props.BugNoteItem = JKContentManager.Props.LoadCustomWorldItem(p_loader, "bug_note"); string str = "mods/props/textures/"; JKContentManager.Props.PropScreens = UltraContent.LoadXmlFiles <PropCollection>(Game1.instance, "mods/props", ".xml"); JKContentManager.Props.NBP_Only_Props = UltraContent.LoadXmlFiles <PropCollection>(Game1.instance, "mods/props/new babe plus props", ".xml"); JKContentManager.Props.OWL_Only_Props = UltraContent.LoadXmlFiles <PropCollection>(Game1.instance, "mods/props/owl props", ".xml"); JKContentManager.Props.RaymanOverlayProps = UltraContent.LoadXmlFiles <PropCollection>(Game1.instance, "mods/props/hidden wall props", ".xml"); PropSettings propSettings = XmlSerializerHelper.Deserialize <PropSettings>(p_loader.RootDirectory + "/mods/props/textures/prop_settings.xml"); PropManager.SetContentData(propSettings); foreach (PropSetting propSetting in propSettings.settings) { Texture2D p_texture = p_loader.Load <Texture2D>(str + propSetting.name); JKContentManager.Props.PropSprites.Add(propSetting.name, JKContentManager.Util.SpriteChopUtilGrid(p_texture, propSetting.sheet_cells)); } JKContentManager.Props.RaymanScreens = UltraContent.LoadXmlFiles <RaymanCollection>(Game1.instance, "mods/props/hidden_walls", ".xml"); Dictionary <string, Texture2D> dictionary = JKExtensions.UltraContent.LoadCunt <Texture2D>(Game1.instance.Content, "mods/props/hidden_walls/textures", ".*"); JKContentManager.Props.RaymanSprites = new Dictionary <string, Sprite>(); foreach (KeyValuePair <string, Texture2D> keyValuePair in dictionary) { JKContentManager.Props.RaymanSprites.Add(keyValuePair.Key, Sprite.CreateSprite(keyValuePair.Value)); } Dictionary <string, RattmanSettings> dictionary2 = UltraContent.LoadXmlFiles <RattmanSettings>(Game1.instance, "mods/props/messages", ".xml"); JKContentManager.Props.RattmanSettings = new RattmanSettings[dictionary2.Keys.Count]; int num = 0; foreach (string key in dictionary2.Keys) { JKContentManager.Props.RattmanSettings[num++] = dictionary2[key]; } JKContentManager.Props.AchievementHitboxes = UltraContent.LoadXmlFiles <AchievementHitbox>(Game1.instance, "props/achievements", ".xml"); JKContentManager.Props.BabeGhostWorldItem = JKContentManager.Props.PropSprites["babeghost"][3]; }
private void SaveSetting() { MessageDisplay msgDisplay = CreateMessageDisplay(); PropSettings settings = new PropSettings(); settings.EnablePropFunction = _Request.Get<bool>("EnablePropFunction", Method.Post, true); settings.MaxPackageSize = new ExceptableItem_Int().GetExceptable("MaxPackageSize", msgDisplay); settings.SaveLogDays = _Request.Get<int>("SaveDays", Method.Post, 30); settings.DataClearMode = _Request.Get<JobDataClearMode>("DataClearMode", JobDataClearMode.Disabled); settings.SaveLogRows = _Request.Get<int>("SaveRows", Method.Post, 10000); if (!msgDisplay.HasAnyError()) { SettingManager.SaveSettings(settings); string rawUrl = Request.RawUrl; BbsRouter.JumpToUrl(rawUrl, "success=1"); } }
private void SaveSetting() { MessageDisplay msgDisplay = CreateMessageDisplay(); PropSettings settings = new PropSettings(); settings.EnablePropFunction = _Request.Get <bool>("EnablePropFunction", Method.Post, true); settings.MaxPackageSize = new ExceptableItem_Int().GetExceptable("MaxPackageSize", msgDisplay); settings.SaveLogDays = _Request.Get <int>("SaveDays", Method.Post, 30); settings.DataClearMode = _Request.Get <JobDataClearMode>("DataClearMode", JobDataClearMode.Disabled); settings.SaveLogRows = _Request.Get <int>("SaveRows", Method.Post, 10000); if (!msgDisplay.HasAnyError()) { SettingManager.SaveSettings(settings); string rawUrl = Request.RawUrl; BbsRouter.JumpToUrl(rawUrl, "success=1"); } }
public Prop(Room room, PropSettings settings, OwnerId owner, float2 position) : base(room, settings, owner, position) { Health = settings.Health; PropSettings = settings; }