コード例 #1
0
ファイル: TargetVelAdd.cs プロジェクト: xubingyue/xnamugen
 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);
 }
コード例 #2
0
ファイル: StateTypeSet.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #3
0
 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);
 }
コード例 #4
0
ファイル: SndPan.cs プロジェクト: terrynoya/xnamugen-1
 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);
 }
コード例 #5
0
ファイル: VarAdd.cs プロジェクト: lodossDev/xnamugen
        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);
            }
        }
コード例 #6
0
ファイル: SndPan.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #7
0
 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);
 }
コード例 #8
0
 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);
 }
コード例 #9
0
 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);
 }
コード例 #10
0
 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);
 }
コード例 #11
0
ファイル: MakeDust.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #12
0
ファイル: NotHitBy.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #13
0
ファイル: TargetVelAdd.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #14
0
ファイル: HitFallSet.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #15
0
ファイル: ChangeState.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #16
0
ファイル: AssertSpecial.cs プロジェクト: terrynoya/xnamugen-1
 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);
 }
コード例 #17
0
ファイル: AssertSpecial.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #18
0
ファイル: NonCombatScreen.cs プロジェクト: xubingyue/xnamugen
        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();
        }
コード例 #19
0
 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);
 }
コード例 #20
0
ファイル: LifeAdd.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #21
0
ファイル: BindToParent.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #22
0
ファイル: TargetBind.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #23
0
ファイル: StateTypeSet.cs プロジェクト: terrynoya/xnamugen-1
 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);
 }
コード例 #24
0
ファイル: MakeDust.cs プロジェクト: terrynoya/xnamugen-1
 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);
 }
コード例 #25
0
        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>();
        }
コード例 #26
0
ファイル: EnvShake.cs プロジェクト: xubingyue/xnamugen
 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);
 }
コード例 #27
0
 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);
 }
コード例 #28
0
ファイル: GameMakeAnim.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #29
0
ファイル: Pause.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #30
0
ファイル: EnvShake.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #31
0
 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);
 }
コード例 #32
0
ファイル: BindToTarget.cs プロジェクト: lodossDev/xnamugen
        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);
        }
コード例 #33
0
ファイル: VarRangeSet.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #34
0
ファイル: AfterImageTime.cs プロジェクト: lodossDev/xnamugen
        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;
        }
コード例 #35
0
        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;
        }
コード例 #36
0
 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);
 }
コード例 #37
0
ファイル: BindToTarget.cs プロジェクト: xubingyue/xnamugen
        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);
        }
コード例 #38
0
ファイル: Stage.cs プロジェクト: xubingyue/xnamugen
        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));
        }
コード例 #39
0
ファイル: HitOverride.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #40
0
ファイル: ForceFeedback.cs プロジェクト: terrynoya/xnamugen-1
 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);
 }
コード例 #41
0
ファイル: ForceFeedback.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #42
0
ファイル: Stage.cs プロジェクト: terrynoya/xnamugen-1
        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));
        }
コード例 #43
0
 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);
 }
コード例 #44
0
        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;
        }
コード例 #45
0
ファイル: EnvColor.cs プロジェクト: lodossDev/xnamugen
        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);
        }
コード例 #46
0
        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);
        }
コード例 #47
0
ファイル: VersusData.cs プロジェクト: lodossDev/xnamugen
        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");
        }
コード例 #48
0
        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);
        }
コード例 #49
0
ファイル: Width.cs プロジェクト: nykevinwong/xnamugen-1
        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;
            }
        }
コード例 #50
0
ファイル: Width.cs プロジェクト: lodossDev/xnamugen
        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;
            }
        }
コード例 #51
0
ファイル: StateController.cs プロジェクト: lodossDev/xnamugen
        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;
        }
コード例 #52
0
        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"));
        }
コード例 #53
0
ファイル: SelectData.cs プロジェクト: lodossDev/xnamugen
        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();
        }
コード例 #54
0
ファイル: StateSystem.cs プロジェクト: terrynoya/xnamugen-1
        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);
        }
コード例 #55
0
ファイル: Collection.cs プロジェクト: terrynoya/xnamugen-1
        /// <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);
        }
コード例 #56
0
ファイル: Collection.cs プロジェクト: lodossDev/xnamugen
		/// <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);
		}
コード例 #57
0
ファイル: Collection.cs プロジェクト: lodossDev/xnamugen
		/// <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;
		}
コード例 #58
0
ファイル: VersusScreen.cs プロジェクト: lodossDev/xnamugen
 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);
 }
コード例 #59
0
ファイル: NonCombatScreen.cs プロジェクト: lodossDev/xnamugen
        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();
        }
コード例 #60
0
ファイル: Parallax.cs プロジェクト: lodossDev/xnamugen
		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);
		}