public TargetVelAdd(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_targetid = textsection.GetAttribute <Evaluation.Expression>("id", null); m_x = textsection.GetAttribute <Evaluation.Expression>("x", null); m_y = textsection.GetAttribute <Evaluation.Expression>("y", null); }
public StateTypeSet(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_statetype = textsection.GetAttribute<StateType>("statetype", StateType.Unchanged); m_movetype = textsection.GetAttribute<MoveType>("movetype", MoveType.Unchanged); m_physics = textsection.GetAttribute<Physics>("Physics", Physics.Unchanged); }
public LifeAdd(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_life = textsection.GetAttribute <Evaluation.Expression>("value", null); m_cankill = textsection.GetAttribute <Evaluation.Expression>("kill", null); m_abs = textsection.GetAttribute <Evaluation.Expression>("absolute", null); }
public SndPan(StateSystem statesystem, string label, TextSection textsection) : base(statesystem, label, textsection) { m_channel = textsection.GetAttribute <Evaluation.Expression>("channel", null); m_pan = textsection.GetAttribute <Evaluation.Expression>("pan", null); m_abspan = textsection.GetAttribute <Evaluation.Expression>("abspan", null); }
public VarAdd(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_intnumber = textsection.GetAttribute<Evaluation.Expression>("v", null); m_floatnumber = textsection.GetAttribute<Evaluation.Expression>("fv", null); m_systemintnumber = textsection.GetAttribute<Evaluation.Expression>("sysvar", null); m_systemfloatnumber = textsection.GetAttribute<Evaluation.Expression>("sysfvar", null); m_value = textsection.GetAttribute<Evaluation.Expression>("value", null); foreach (KeyValuePair<String, String> parsedline in textsection.ParsedLines) { Match match = s_lineregex.Match(parsedline.Key); if (match.Success == false) continue; Evaluation.EvaluationSystem evalsystem = StateSystem.GetSubSystem<Evaluation.EvaluationSystem>(); StringComparer sc = StringComparer.OrdinalIgnoreCase; String var_type = match.Groups[1].Value; Evaluation.Expression var_number = evalsystem.CreateExpression(match.Groups[2].Value); if (sc.Equals(var_type, "") == true) m_intnumber = var_number; if (sc.Equals(var_type, "f") == true) m_floatnumber = var_number; if (sc.Equals(var_type, "sys") == true) m_systemintnumber = var_number; if (sc.Equals(var_type, "sysf") == true) m_systemfloatnumber = var_number; m_value = evalsystem.CreateExpression(parsedline.Value); } }
public SndPan(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_channel = textsection.GetAttribute<Evaluation.Expression>("channel", null); m_pan = textsection.GetAttribute<Evaluation.Expression>("pan", null); m_abspan = textsection.GetAttribute<Evaluation.Expression>("abspan", null); }
public NotHitBy(StateSystem statesystem, string label, TextSection textsection) : base(statesystem, label, textsection) { m_hitattr1 = textsection.GetAttribute <Combat.HitAttribute>("value", null); m_hitattr2 = textsection.GetAttribute <Combat.HitAttribute>("value2", null); m_time = textsection.GetAttribute <Evaluation.Expression>("time", null); }
public TargetBind(StateSystem statesystem, string label, TextSection textsection) : base(statesystem, label, textsection) { m_time = textsection.GetAttribute <Evaluation.Expression>("time", null); m_id = textsection.GetAttribute <Evaluation.Expression>("id", null); m_pos = textsection.GetAttribute <Evaluation.Expression>("pos", null); }
public BindToRoot(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_time = textsection.GetAttribute <Evaluation.Expression>("time", null); m_facing = textsection.GetAttribute <Evaluation.Expression>("facing", null); m_position = textsection.GetAttribute <Evaluation.Expression>("pos", null); }
public ChangeState(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_statenumber = textsection.GetAttribute <Evaluation.Expression>("value", null); m_control = textsection.GetAttribute <Evaluation.Expression>("ctrl", null); m_animationnumber = textsection.GetAttribute <Evaluation.Expression>("anim", null); }
public MakeDust(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_pos = textsection.GetAttribute<Evaluation.Expression>("pos", null); m_pos2 = textsection.GetAttribute<Evaluation.Expression>("pos2", null); m_spacing = textsection.GetAttribute<Evaluation.Expression>("spacing", null); }
public NotHitBy(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_hitattr1 = textsection.GetAttribute<Combat.HitAttribute>("value", null); m_hitattr2 = textsection.GetAttribute<Combat.HitAttribute>("value2", null); m_time = textsection.GetAttribute<Evaluation.Expression>("time", null); }
public TargetVelAdd(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_targetid = textsection.GetAttribute<Evaluation.Expression>("id", null); m_x = textsection.GetAttribute<Evaluation.Expression>("x", null); m_y = textsection.GetAttribute<Evaluation.Expression>("y", null); }
public HitFallSet(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_fallset = textsection.GetAttribute<Evaluation.Expression>("value", null); m_velx = textsection.GetAttribute<Evaluation.Expression>("xvel", null); m_vely = textsection.GetAttribute<Evaluation.Expression>("yvel", null); }
public ChangeState(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_statenumber = textsection.GetAttribute<Evaluation.Expression>("value", null); m_control = textsection.GetAttribute<Evaluation.Expression>("ctrl", null); m_animationnumber = textsection.GetAttribute<Evaluation.Expression>("anim", null); }
public AssertSpecial(StateSystem statesystem, string label, TextSection textsection) : base(statesystem, label, textsection) { m_assert1 = textsection.GetAttribute("flag", Assertion.None); m_assert2 = textsection.GetAttribute("flag2", Assertion.None); m_assert3 = textsection.GetAttribute("flag3", Assertion.None); }
public AssertSpecial(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_assert1 = textsection.GetAttribute<Assertion>("flag", Assertion.None); m_assert2 = textsection.GetAttribute<Assertion>("flag2", Assertion.None); m_assert3 = textsection.GetAttribute<Assertion>("flag3", Assertion.None); }
protected NonCombatScreen(MenuSystem menusystem, TextSection textsection, String spritepath, String animationpath, String soundpath) : base(menusystem) { if (textsection == null) { throw new ArgumentNullException("textsection"); } if (spritepath == null) { throw new ArgumentNullException("spritepath"); } if (animationpath == null) { throw new ArgumentNullException("animationpath"); } if (soundpath == null) { throw new ArgumentNullException("soundpath"); } m_soundmanager = MenuSystem.GetSubSystem <Audio.SoundSystem>().CreateManager(soundpath); m_spritemanager = MenuSystem.GetSubSystem <Drawing.SpriteSystem>().CreateManager(spritepath); m_animationmanager = MenuSystem.GetSubSystem <Animations.AnimationSystem>().CreateManager(animationpath); m_backgrounds = new Backgrounds.Collection(m_spritemanager.Clone(), m_animationmanager.Clone()); m_fadeintime = textsection.GetAttribute <Int32>("fadein.time"); m_fadeouttime = textsection.GetAttribute <Int32>("fadeout.time"); SpriteManager.LoadAllSprites(); }
public HitFallSet(StateSystem statesystem, string label, TextSection textsection) : base(statesystem, label, textsection) { m_fallset = textsection.GetAttribute <Evaluation.Expression>("value", null); m_velx = textsection.GetAttribute <Evaluation.Expression>("xvel", null); m_vely = textsection.GetAttribute <Evaluation.Expression>("yvel", null); }
public LifeAdd(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_life = textsection.GetAttribute<Evaluation.Expression>("value", null); m_cankill = textsection.GetAttribute<Evaluation.Expression>("kill", null); m_abs = textsection.GetAttribute<Evaluation.Expression>("absolute", null); }
public BindToParent(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_time = textsection.GetAttribute<Evaluation.Expression>("time", null); m_facing = textsection.GetAttribute<Evaluation.Expression>("facing", null); m_position = textsection.GetAttribute<Evaluation.Expression>("pos", null); }
public TargetBind(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_time = textsection.GetAttribute<Evaluation.Expression>("time", null); m_id = textsection.GetAttribute<Evaluation.Expression>("id", null); m_pos = textsection.GetAttribute<Evaluation.Expression>("pos", null); }
public StateTypeSet(StateSystem statesystem, string label, TextSection textsection) : base(statesystem, label, textsection) { m_statetype = textsection.GetAttribute("statetype", StateType.Unchanged); m_movetype = textsection.GetAttribute("movetype", MoveType.Unchanged); m_physics = textsection.GetAttribute("Physics", Physics.Unchanged); }
public MakeDust(StateSystem statesystem, string label, TextSection textsection) : base(statesystem, label, textsection) { m_pos = textsection.GetAttribute <Evaluation.Expression>("pos", null); m_pos2 = textsection.GetAttribute <Evaluation.Expression>("pos2", null); m_spacing = textsection.GetAttribute <Evaluation.Expression>("spacing", null); }
public MenuSystem(SubSystems subsystems) : base(subsystems) { TextFile textfile = GetSubSystem <IO.FileSystem>().OpenTextFile(@"data/system.def"); TextSection info = textfile.GetSection("info"); TextSection files = textfile.GetSection("files"); m_motifname = info.GetAttribute <String>("name", String.Empty); m_motifauthor = info.GetAttribute <String>("author", String.Empty); Dictionary <Int32, Font> fontmap = new Dictionary <Int32, Font>(); Drawing.SpriteSystem spritesystem = GetSubSystem <Drawing.SpriteSystem>(); String fontpath1 = files.GetAttribute <String>("font1", null); if (fontpath1 != null) { fontmap[1] = spritesystem.LoadFont(fontpath1); } String fontpath2 = files.GetAttribute <String>("font2", null); if (fontpath2 != null) { fontmap[2] = spritesystem.LoadFont(fontpath2); } String fontpath3 = files.GetAttribute <String>("font3", null); if (fontpath3 != null) { fontmap[3] = spritesystem.LoadFont(fontpath3); } m_fontmap = new Drawing.FontMap(fontmap); String soundpath = @"data/" + files.GetAttribute <String>("snd"); String spritepath = @"data/" + files.GetAttribute <String>("spr"); String animpath = textfile.Filepath; m_titlescreen = new TitleScreen(this, textfile.GetSection("Title Info"), spritepath, animpath, soundpath); m_titlescreen.LoadBackgrounds("Title", textfile); m_versusscreen = new VersusScreen(this, textfile.GetSection("VS Screen"), spritepath, animpath, soundpath); m_versusscreen.LoadBackgrounds("Versus", textfile); m_selectscreen = new SelectScreen(this, textfile.GetSection("Select Info"), spritepath, animpath, soundpath); m_selectscreen.LoadBackgrounds("Select", textfile); m_combatscreen = new CombatScreen(this); m_replayscreen = new RecordedCombatScreen(this); m_currentscreen = null; m_newscreen = null; m_fade = 0; m_fadespeed = 0; m_eventqueue = new Queue <Events.Base>(); }
public EnvShake(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_time = textsection.GetAttribute <Evaluation.Expression>("Time", null); m_freq = textsection.GetAttribute <Evaluation.Expression>("freq", null); m_amplitude = textsection.GetAttribute <Evaluation.Expression>("ampl", null); m_phaseoffset = textsection.GetAttribute <Evaluation.Expression>("phase", null); }
public GameMakeAnim(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_anim = textsection.GetAttribute <Evaluation.Expression>("value", null); m_drawunder = textsection.GetAttribute <Evaluation.Expression>("under", null); m_position = textsection.GetAttribute <Evaluation.Expression>("pos", null); m_random = textsection.GetAttribute <Evaluation.Expression>("random", null); }
public GameMakeAnim(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_anim = textsection.GetAttribute<Evaluation.Expression>("value", null); m_drawunder = textsection.GetAttribute<Evaluation.Expression>("under", null); m_position = textsection.GetAttribute<Evaluation.Expression>("pos", null); m_random = textsection.GetAttribute<Evaluation.Expression>("random", null); }
public Pause(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_time = textsection.GetAttribute<Evaluation.Expression>("time", null); m_cmdbuffertime = textsection.GetAttribute<Evaluation.Expression>("endcmdbuftime", null); m_movetime = textsection.GetAttribute<Evaluation.Expression>("movetime", null); m_pausebackground = textsection.GetAttribute<Evaluation.Expression>("pausebg", null); }
public EnvShake(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_time = textsection.GetAttribute<Evaluation.Expression>("Time", null); m_freq = textsection.GetAttribute<Evaluation.Expression>("freq", null); m_amplitude = textsection.GetAttribute<Evaluation.Expression>("ampl", null); m_phaseoffset = textsection.GetAttribute<Evaluation.Expression>("phase", null); }
public Pause(StateSystem statesystem, string label, TextSection textsection) : base(statesystem, label, textsection) { m_time = textsection.GetAttribute <Evaluation.Expression>("time", null); m_cmdbuffertime = textsection.GetAttribute <Evaluation.Expression>("endcmdbuftime", null); m_movetime = textsection.GetAttribute <Evaluation.Expression>("movetime", null); m_pausebackground = textsection.GetAttribute <Evaluation.Expression>("pausebg", null); }
public BindToTarget(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_time = textsection.GetAttribute<Evaluation.Expression>("time", null); m_targetid = textsection.GetAttribute<Evaluation.Expression>("id", null); ParsePositionString(textsection.GetAttribute<String>("pos", null), out m_position, out m_bindpos); }
public VarRangeSet(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_intnumber = textsection.GetAttribute<Evaluation.Expression>("value", null); m_floatnumber = textsection.GetAttribute<Evaluation.Expression>("fvalue", null); m_startrrange = textsection.GetAttribute<Evaluation.Expression>("first", null); m_endrange = textsection.GetAttribute<Evaluation.Expression>("last", null); }
public AfterImageTime(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { Evaluation.Expression exp_time = textsection.GetAttribute<Evaluation.Expression>("time", null); Evaluation.Expression exp_value = textsection.GetAttribute<Evaluation.Expression>("value", null); m_time = exp_time ?? exp_value; }
public AfterImageTime(StateSystem statesystem, string label, TextSection textsection) : base(statesystem, label, textsection) { var expTime = textsection.GetAttribute <Evaluation.Expression>("time", null); var expValue = textsection.GetAttribute <Evaluation.Expression>("value", null); m_time = expTime ?? expValue; }
public VarRangeSet(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_intnumber = textsection.GetAttribute <Evaluation.Expression>("value", null); m_floatnumber = textsection.GetAttribute <Evaluation.Expression>("fvalue", null); m_startrrange = textsection.GetAttribute <Evaluation.Expression>("first", null); m_endrange = textsection.GetAttribute <Evaluation.Expression>("last", null); }
public BindToTarget(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_time = textsection.GetAttribute <Evaluation.Expression>("time", null); m_targetid = textsection.GetAttribute <Evaluation.Expression>("id", null); ParsePositionString(textsection.GetAttribute <String>("pos", null), out m_position, out m_bindpos); }
static BoundsRect BuildBoundsRect(TextSection textsection, String left, String right, String top, String bottom) { Int32 leftval = textsection.GetAttribute <Int32>(left); Int32 rightval = textsection.GetAttribute <Int32>(right); Int32 topval = textsection.GetAttribute <Int32>(top); Int32 downval = textsection.GetAttribute <Int32>(bottom); return(new BoundsRect(leftval, rightval, topval, downval)); }
public HitOverride(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_hitattr = textsection.GetAttribute<Combat.HitAttribute>("attr", null); m_slot = textsection.GetAttribute<Evaluation.Expression>("slot", null); m_statenumber = textsection.GetAttribute<Evaluation.Expression>("stateno", null); m_time = textsection.GetAttribute<Evaluation.Expression>("time", null); m_forceair = textsection.GetAttribute<Evaluation.Expression>("forceair", null); }
public ForceFeedback(StateSystem statesystem, string label, TextSection textsection) : base(statesystem, label, textsection) { m_rumbletype = textsection.GetAttribute("waveform", ForceFeedbackType.Sine); m_time = textsection.GetAttribute <Evaluation.Expression>("time", null); m_freq = textsection.GetAttribute <Evaluation.Expression>("freq", null); m_ampl = textsection.GetAttribute <Evaluation.Expression>("ampl", null); m_self = textsection.GetAttribute <Evaluation.Expression>("self", null); }
public ForceFeedback(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_rumbletype = textsection.GetAttribute<ForceFeedbackType>("waveform", ForceFeedbackType.Sine); m_time = textsection.GetAttribute<Evaluation.Expression>("time", null); m_freq = textsection.GetAttribute<Evaluation.Expression>("freq", null); m_ampl = textsection.GetAttribute<Evaluation.Expression>("ampl", null); m_self = textsection.GetAttribute<Evaluation.Expression>("self", null); }
private static BoundsRect BuildBoundsRect(TextSection textsection, string left, string right, string top, string bottom) { var leftval = textsection.GetAttribute(left, 0); var rightval = textsection.GetAttribute(right, 0); var topval = textsection.GetAttribute(top, 0); var downval = textsection.GetAttribute(bottom, 0); return(new BoundsRect(leftval, rightval, topval, downval)); }
public HitOverride(StateSystem statesystem, string label, TextSection textsection) : base(statesystem, label, textsection) { m_hitattr = textsection.GetAttribute <Combat.HitAttribute>("attr", null); m_slot = textsection.GetAttribute <Evaluation.Expression>("slot", null); m_statenumber = textsection.GetAttribute <Evaluation.Expression>("stateno", null); m_time = textsection.GetAttribute <Evaluation.Expression>("time", null); m_forceair = textsection.GetAttribute <Evaluation.Expression>("forceair", null); }
public ExplodBindTime(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_id = textsection.GetAttribute <Evaluation.Expression>("id", null); Evaluation.Expression exp_time = textsection.GetAttribute <Evaluation.Expression>("time", null); Evaluation.Expression exp_value = textsection.GetAttribute <Evaluation.Expression>("value", null); m_time = exp_time ?? exp_value; }
public EnvColor(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { Evaluation.Expression exp_value = textsection.GetAttribute<Evaluation.Expression>("value", null); Evaluation.Expression exp_color = textsection.GetAttribute<Evaluation.Expression>("Color", null); m_color = exp_value ?? exp_color; m_time = textsection.GetAttribute<Evaluation.Expression>("Time", null); m_under = textsection.GetAttribute<Evaluation.Expression>("under", null); }
public EnvColor(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { Evaluation.Expression exp_value = textsection.GetAttribute <Evaluation.Expression>("value", null); Evaluation.Expression exp_color = textsection.GetAttribute <Evaluation.Expression>("Color", null); m_color = exp_value ?? exp_color; m_time = textsection.GetAttribute <Evaluation.Expression>("Time", null); m_under = textsection.GetAttribute <Evaluation.Expression>("under", null); }
public VersusData(String prefix, TextSection textsection) { if (prefix == null) throw new ArgumentNullException("prefix"); if (textsection == null) throw new ArgumentNullException("textsection"); m_profile = null; m_portraitlocation = textsection.GetAttribute<Point>(prefix + "pos"); m_portraitscale = textsection.GetAttribute<Vector2>(prefix + "scale"); m_portraitflip = (textsection.GetAttribute<Int32>(prefix + "facing") < 0) ? SpriteEffects.FlipHorizontally : SpriteEffects.None; m_namelocation = textsection.GetAttribute<Point>(prefix + "name.pos"); m_printdata = textsection.GetAttribute<PrintData>(prefix + "name.font"); }
public ArcadeSelectScreenBehavior(SelectScreen selectScreen, TextSection textsection) { SelectScreen = selectScreen; m_stageSelect = new StageSelect(selectScreen, textsection); m_soundcancel = textsection.GetAttribute <SoundId>("cancel.snd"); m_titlelocation = textsection.GetAttribute <Point>("title.offset"); m_titlefont = textsection.GetAttribute <PrintData>("title.font"); m_p1info = new SelectData(selectScreen, selectScreen.MenuSystem.GetSubSystem <Input.InputSystem>().CurrentInput[1], textsection, "p1", Grid.MoveOverEmptyBoxes); }
public Width(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_edge = textsection.GetAttribute <Evaluation.Expression>("edge", null); m_player = textsection.GetAttribute <Evaluation.Expression>("player", null); Evaluation.Expression exp_value = textsection.GetAttribute <Evaluation.Expression>("value", null); if (exp_value != null) { m_edge = exp_value; m_player = exp_value; } }
public Width(StateSystem statesystem, String label, TextSection textsection) : base(statesystem, label, textsection) { m_edge = textsection.GetAttribute<Evaluation.Expression>("edge", null); m_player = textsection.GetAttribute<Evaluation.Expression>("player", null); Evaluation.Expression exp_value = textsection.GetAttribute<Evaluation.Expression>("value", null); if (exp_value != null) { m_edge = exp_value; m_player = exp_value; } }
protected StateController(StateSystem statesystem, String label, TextSection textsection) { if (statesystem == null) throw new ArgumentNullException("statesystem"); if (label == null) throw new ArgumentNullException("label"); if (textsection == null) throw new ArgumentNullException("textsection"); m_statesystem = statesystem; m_textsection = textsection; m_persistence = textsection.GetAttribute<Int32>("persistent", 1); m_ignorehitpause = textsection.GetAttribute<Boolean>("ignorehitpause", false); m_triggers = BuildTriggers(textsection); m_label = label; }
public Fader(Texture2D emptyTexture, TextSection textSection) { if (textSection == null) { throw new ArgumentNullException(nameof(textSection)); } m_emptyTexture = emptyTexture; m_fadeTime = 255; FadeInTime = textSection.GetAttribute <int>("fadein.time"); FadeInColor = new Color(textSection.GetAttribute <Vector3>("fadein.col")); FadeOutTime = textSection.GetAttribute <int>("fadeout.time"); FadeOutColor = new Color(textSection.GetAttribute <Vector3>("fadeout.col")); }
public SelectData(SelectScreen selectscreen, Input.ButtonMap buttonmap, TextSection textsection, String prefix, Boolean moveoverempty) { if (selectscreen == null) throw new ArgumentNullException("selectscreen"); if (buttonmap == null) throw new ArgumentNullException("buttonmap"); if (textsection == null) throw new ArgumentNullException("textsection"); if (prefix == null) throw new ArgumentNullException("prefix"); m_selectscreen = selectscreen; m_buttonmap = buttonmap; m_moveoverempty = moveoverempty; m_elements = new Elements.Collection(SelectScreen.SpriteManager, SelectScreen.AnimationManager, SelectScreen.SoundManager, SelectScreen.MenuSystem.FontMap); m_elements.Build("cursor.active", textsection, prefix + ".cursor.active"); m_elements.Build("cursor.done", textsection, prefix + ".cursor.done"); m_elements.Build("cursor.move", textsection, prefix + ".cursor.move"); m_elements.Build("random.move", textsection, prefix + ".random.move"); m_elements.Build("player.face", textsection, prefix + ".face"); m_elements.Build("player.name", textsection, prefix + ".name"); m_startcell = textsection.GetAttribute<Point>(prefix + ".cursor.startcell"); // X & Y seem to be reversed for this m_startcell = new Point(m_startcell.Y, m_startcell.X); Reset(); }
private StateController CreateController(TextSection textsection) { if (textsection == null) { throw new ArgumentNullException(nameof(textsection)); } var match = _controllertitleregex.Match(textsection.Title); if (match.Success == false) { return(null); } var typename = textsection.GetAttribute <string>("type", null); if (typename == null) { Log.Write(LogLevel.Warning, LogSystem.StateSystem, "Controller '{0}' does not have a type.", textsection); return(null); } if (_controllermap.ContainsKey(typename) == false) { Log.Write(LogLevel.Warning, LogSystem.StateSystem, "Controller '{0}' has invalid type - '{1}'.", textsection, typename); return(null); } var controller = (StateController)_controllermap[typename](this, match.Groups[1].Value, textsection); return(controller); }
/// <summary> /// Creates a new background as per of the collection, initializes from the given xnaMugen.IO.TextSection. /// </summary> /// <param name="section">The text section used to create and initialize the created background.</param> /// <returns>The created background, if it could be created; null otherwise.</returns> public void CreateBackground(TextSection section) { if (section == null) { throw new ArgumentNullException(nameof(section)); } var bgtype = section.GetAttribute <BackgroundType>("type"); Base background; switch (bgtype) { case BackgroundType.Static: background = new Static(section, m_spritemanager.Clone()); break; case BackgroundType.Parallax: background = new Parallax(section, m_spritemanager.Clone()); break; case BackgroundType.Animated: background = new Animated(section, m_spritemanager.Clone(), m_animationmanager.Clone()); break; default: Log.Write(LogLevel.Error, LogSystem.BackgroundCollection, "Cannot create background with TextSection: {0}", section); return; } background.Reset(); m_backgrounds.Add(background); }
/// <summary> /// Creates a new background as per of the collection, initializes from the given xnaMugen.IO.TextSection. /// </summary> /// <param name="section">The text section used to create and initialize the created background.</param> /// <returns>The created background, if it could be created; null otherwise.</returns> public void CreateBackground(TextSection section) { if (section == null) throw new ArgumentNullException("section"); BackgroundType bgtype = section.GetAttribute<BackgroundType>("type"); Base background = null; switch (bgtype) { case BackgroundType.Static: background = new Static(section, m_spritemanager.Clone()); break; case BackgroundType.Parallax: background = new Parallax(section, m_spritemanager.Clone()); break; case BackgroundType.Animated: background = new Animated(section, m_spritemanager.Clone(), m_animationmanager.Clone()); break; case BackgroundType.None: default: Log.Write(LogLevel.Error, LogSystem.BackgroundCollection, "Cannot create background with TextSection: {0}", section); return; } background.Reset(); m_backgrounds.Add(background); }
/// <summary> /// Determines whether a background can be created from the given xnaMugen.IO.TextSection. /// </summary> /// <param name="section">A xnaMugen.IO.TextSection.</param> /// <returns>true if a background can be created; false otherwise.</returns> public Boolean CanCreateBackground(TextSection section) { if (section == null) throw new ArgumentNullException("section"); BackgroundType bgtype = section.GetAttribute<BackgroundType>("type"); return bgtype != BackgroundType.None; }
public VersusScreen(MenuSystem screensystem, TextSection textsection, String spritepath, String animationpath, String soundpath) : base(screensystem, textsection, spritepath, animationpath, soundpath) { m_visibletime = textsection.GetAttribute<Int32>("time"); m_p1 = new VersusData("p1.", textsection); m_p2 = new VersusData("p2.", textsection); m_timer = new CountdownTimer(TimeSpan.FromSeconds(m_visibletime / 60.0f), this.ShowTimeComplete); }
protected NonCombatScreen(MenuSystem menusystem, TextSection textsection, String spritepath, String animationpath, String soundpath) : base(menusystem) { if (textsection == null) throw new ArgumentNullException("textsection"); if (spritepath == null) throw new ArgumentNullException("spritepath"); if (animationpath == null) throw new ArgumentNullException("animationpath"); if (soundpath == null) throw new ArgumentNullException("soundpath"); m_soundmanager = MenuSystem.GetSubSystem<Audio.SoundSystem>().CreateManager(soundpath); m_spritemanager = MenuSystem.GetSubSystem<Drawing.SpriteSystem>().CreateManager(spritepath); m_animationmanager = MenuSystem.GetSubSystem<Animations.AnimationSystem>().CreateManager(animationpath); m_backgrounds = new Backgrounds.Collection(m_spritemanager.Clone(), m_animationmanager.Clone()); m_fadeintime = textsection.GetAttribute<Int32>("fadein.time"); m_fadeouttime = textsection.GetAttribute<Int32>("fadeout.time"); SpriteManager.LoadAllSprites(); }
public Parallax(TextSection textsection, Drawing.SpriteManager spritemanager) : base(textsection) { if (spritemanager == null) throw new ArgumentNullException("spritemanager"); m_spritemanager = spritemanager; m_spriteid = textsection.GetAttribute<SpriteId>("spriteno", SpriteId.Invalid); m_sprite = SpriteManager.GetSprite(SpriteId); }