Exemple #1
0
 protected override void Start()
 {
     //  _skillSystem = new SkillSystem(this.gameObject);
     _stateSystem = new StateSystem(this.gameObject);
     //SkillInstance _instance = _skillSystem.Create(eSkillType.Normal, transform);
     //_skillSystem.Add(_instance);
 }
Exemple #2
0
 public void Awake()
 {
     if (stateManager == null)
     {
         stateManager = GameObject.Find("State System").GetComponent <StateSystem>();
     }
 }
Exemple #3
0
 public Helper(StateSystem statesystem, String label, TextSection textsection)
     : base(statesystem, label, textsection)
 {
     m_helpertype = textsection.GetAttribute<HelperType>("helpertype", HelperType.Normal);
     m_name = textsection.GetAttribute<String>("name", null);
     m_id = textsection.GetAttribute<Evaluation.Expression>("id", null);
     m_position = textsection.GetAttribute<Evaluation.Expression>("pos", null);
     m_postype = textsection.GetAttribute<PositionType>("postype", PositionType.P1);
     m_facing = textsection.GetAttribute<Evaluation.Expression>("facing", null);
     m_statenumber = textsection.GetAttribute<Evaluation.Expression>("stateno", null);
     m_keyctrl = textsection.GetAttribute<Evaluation.Expression>("keyctrl", null);
     m_ownpal = textsection.GetAttribute<Evaluation.Expression>("ownpal", null);
     m_supermovetime = textsection.GetAttribute<Evaluation.Expression>("SuperMoveTime", null);
     m_pausemovetime = textsection.GetAttribute<Evaluation.Expression>("PauseMoveTime", null);
     m_xscale = textsection.GetAttribute<Evaluation.Expression>("size.xscale", null);
     m_yscale = textsection.GetAttribute<Evaluation.Expression>("size.yscale", null);
     m_groundback = textsection.GetAttribute<Evaluation.Expression>("size.ground.back", null);
     m_groundfront = textsection.GetAttribute<Evaluation.Expression>("size.ground.front", null);
     m_airback = textsection.GetAttribute<Evaluation.Expression>("size.air.back", null);
     m_airfront = textsection.GetAttribute<Evaluation.Expression>("size.air.front", null);
     m_height = textsection.GetAttribute<Evaluation.Expression>("size.height", null);
     m_projectscaling = textsection.GetAttribute<Evaluation.Expression>("size.proj.doscale", null);
     m_headpos = textsection.GetAttribute<Evaluation.Expression>("size.head.pos", null);
     m_midpos = textsection.GetAttribute<Evaluation.Expression>("size.mid.pos", null);
     m_shadowoffset = textsection.GetAttribute<Evaluation.Expression>("size.shadowoffset", null);
 }
Exemple #4
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);
 }
Exemple #5
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);
 }
Exemple #6
0
 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 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);
 }
Exemple #8
0
        public ModifyExplod(StateSystem statesystem, String label, TextSection textsection)
            : base(statesystem, label, textsection)
        {
            m_animationnumber = textsection.GetAttribute <Evaluation.PrefixedExpression>("anim", null);
            m_id             = textsection.GetAttribute <Evaluation.Expression>("id", null);
            m_position       = textsection.GetAttribute <Evaluation.Expression>("pos", null);
            m_postype        = textsection.GetAttribute <PositionType?>("postype", null);
            m_facing         = textsection.GetAttribute <Evaluation.Expression>("facing", null);
            m_verticalfacing = textsection.GetAttribute <Evaluation.Expression>("vfacing", null);
            m_bindtime       = textsection.GetAttribute <Evaluation.Expression>("BindTime", null);

            Evaluation.Expression exp_vel      = textsection.GetAttribute <Evaluation.Expression>("vel", null);
            Evaluation.Expression exp_velocity = textsection.GetAttribute <Evaluation.Expression>("velocity", null);
            m_velocity = exp_vel ?? exp_velocity;

            m_acceleration       = textsection.GetAttribute <Evaluation.Expression>("accel", null);
            m_randomdisplacement = textsection.GetAttribute <Evaluation.Expression>("random", null);
            m_removetime         = textsection.GetAttribute <Evaluation.Expression>("removetime", null);
            m_supermove          = textsection.GetAttribute <Evaluation.Expression>("supermove", null);
            m_supermovetime      = textsection.GetAttribute <Evaluation.Expression>("supermovetime", null);
            m_pausemovetime      = textsection.GetAttribute <Evaluation.Expression>("pausemovetime", null);
            m_scale                = textsection.GetAttribute <Evaluation.Expression>("scale", null);
            m_spritepriority       = textsection.GetAttribute <Evaluation.Expression>("sprpriority", null);
            m_drawontop            = textsection.GetAttribute <Evaluation.Expression>("ontop", null);
            m_shadow               = textsection.GetAttribute <Evaluation.Expression>("shadow", null);
            m_ownpalette           = textsection.GetAttribute <Evaluation.Expression>("ownpal", null);
            m_removeongethit       = textsection.GetAttribute <Evaluation.Expression>("removeongethit", null);
            m_explodignorehitpause = textsection.GetAttribute <Evaluation.Expression>("ignorehitpause", null);
            m_blending             = textsection.GetAttribute <Blending?>("trans", null);
            m_alpha                = textsection.GetAttribute <Evaluation.Expression>("alpha", null);
        }
Exemple #9
0
        public override void Run(Combat.Character character)
        {
            Int32?varindex = EvaluationHelper.AsInt32(character, IntNumber, null);

            if (varindex == null)
            {
                return;
            }

            Int32 min = 0;
            Int32 max = 1;

            if (GetRange(character, out min, out max) == false)
            {
                return;
            }

            if (min > max)
            {
                Misc.Swap(ref min, ref max);
            }

            Int32 randomvalue = StateSystem.GetSubSystem <Random>().NewInt(min, max);

            if (character.Variables.SetInteger(varindex.Value, false, randomvalue) == false)
            {
            }
        }
Exemple #10
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);
 }
Exemple #11
0
 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);
 }
Exemple #12
0
        public ToolBot()
        {
            this.References        = new GameReferences();
            this.InfoBarController = new InfoBarController();
            this.State             = new StateSystem();

            this.OverwatchSystem = new OverwatchSystem();

            this.HackingSystem = new HackingSystem();
            this.HackingSystem.SetReferences(this.References);
            this.HackingSystem.Setup();
            this.HackingSystem.OnStateChange += this.State.SetState;

            this.MyComputerSystem = new MyComputerSystem();
            this.MyComputerSystem.SetReferences(this.References);
            this.MyComputerSystem.Setup();
            this.MyComputerSystem.OnPortAGetInfo += this.InfoBarController.SetMyComputerPortA;
            this.MyComputerSystem.OnPortBGetInfo += this.InfoBarController.SetMyComputerPortB;
            this.MyComputerSystem.OnPortCGetInfo += this.InfoBarController.SetMyComputerPortC;

            this.BlackMarketSystem = new BlackMarketSystem();
            this.BlackMarketSystem.SetReferences(this.References);
            this.BlackMarketSystem.Setup();

            this.DataMinerSystem = new DataMinerSystem();
            this.DataMinerSystem.SetReferences(this.References);
            this.DataMinerSystem.Setup();
            this.DataMinerSystem.OnBTCoinChange     += this.InfoBarController.SetBTCoin;
            this.DataMinerSystem.OnBTCoinChange     += this.MyComputerSystem.SetBTCoin;
            this.DataMinerSystem.OnBTCoinChange     += this.BlackMarketSystem.SetBTCoin;
            this.DataMinerSystem.OnBTCoinGainChange += this.InfoBarController.SetBTCoinGain;
            this.DataMinerSystem.OnBTCoinGainChange += this.MyComputerSystem.SetBTCoinGain;
            this.DataMinerSystem.OnBTCoinGainChange += this.BlackMarketSystem.SetBTCoinGain;
        }
Exemple #13
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);
 }
Exemple #14
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);
 }
Exemple #15
0
 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);
 }
Exemple #16
0
 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);
 }
Exemple #17
0
 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);
 }
Exemple #18
0
 public void CheckHealth()
 {
     if (Program.map.Girl.health <= 0)
     {
         StateSystem.EndGame();
     }
 }
Exemple #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);
 }
Exemple #20
0
 public Helper(StateSystem statesystem, string label, TextSection textsection)
     : base(statesystem, label, textsection)
 {
     m_helpertype     = textsection.GetAttribute("helpertype", HelperType.Normal);
     m_name           = textsection.GetAttribute <string>("name", null);
     m_id             = textsection.GetAttribute <Evaluation.Expression>("id", null);
     m_position       = textsection.GetAttribute <Evaluation.Expression>("pos", null);
     m_postype        = textsection.GetAttribute("postype", PositionType.P1);
     m_facing         = textsection.GetAttribute <Evaluation.Expression>("facing", null);
     m_statenumber    = textsection.GetAttribute <Evaluation.Expression>("stateno", null);
     m_keyctrl        = textsection.GetAttribute <Evaluation.Expression>("keyctrl", null);
     m_ownpal         = textsection.GetAttribute <Evaluation.Expression>("ownpal", null);
     m_supermovetime  = textsection.GetAttribute <Evaluation.Expression>("SuperMoveTime", null);
     m_pausemovetime  = textsection.GetAttribute <Evaluation.Expression>("PauseMoveTime", null);
     m_xscale         = textsection.GetAttribute <Evaluation.Expression>("size.xscale", null);
     m_yscale         = textsection.GetAttribute <Evaluation.Expression>("size.yscale", null);
     m_groundback     = textsection.GetAttribute <Evaluation.Expression>("size.ground.back", null);
     m_groundfront    = textsection.GetAttribute <Evaluation.Expression>("size.ground.front", null);
     m_airback        = textsection.GetAttribute <Evaluation.Expression>("size.air.back", null);
     m_airfront       = textsection.GetAttribute <Evaluation.Expression>("size.air.front", null);
     m_height         = textsection.GetAttribute <Evaluation.Expression>("size.height", null);
     m_projectscaling = textsection.GetAttribute <Evaluation.Expression>("size.proj.doscale", null);
     m_headpos        = textsection.GetAttribute <Evaluation.Expression>("size.head.pos", null);
     m_midpos         = textsection.GetAttribute <Evaluation.Expression>("size.mid.pos", null);
     m_shadowoffset   = textsection.GetAttribute <Evaluation.Expression>("size.shadowoffset", null);
 }
    public void Initialize()
    {
        initialized = true;

        player.loopPointReached += NextMovie;
        stateManager             = GameObject.Find("State System").GetComponent <StateSystem>();
    }
Exemple #22
0
        public Form1()
        {
            _fastLoop = new FastLoop(GameLoop);
            _system   = new StateSystem();

            InitializeComponent();
            Stage.InitializeContexts();
            Setup2DGraphics(ClientSize.Width, ClientSize.Height);
            Sys.LoadMap();
            Sys.InitializeMap();

            Sys.halfHeight = ClientSize.Height / 2;
            Sys.halfWidth  = ClientSize.Width / 2;

            Sys.preX = ClientSize.Width / Sys.currentMap.map.GetLength(0);
            Sys.preY = ClientSize.Height / Sys.currentMap.map.GetLength(1);

            Gl.glScalef(0.02f / Sys.preX, 0.02f / Sys.preY, 1);

            _system.AddState("map", Sys.currentMap);
            _system.ChangeState("map");

            Form2 frm = new Form2();

            frm.Show();

            timer1.Enabled = true;
            //Gl.glTranslatef(-ClientSize.Width / 2, -ClientSize.Height / 2, 0);
        }
Exemple #23
0
        public GameOverState(PersistantGameData data, StateSystem system, Input input, Font generalFont, Font titleFont, SoundManager soundManager)
        {
            _gameData     = data;
            _system       = system;
            _input        = input;
            _generalFont  = generalFont;
            _titleFont    = titleFont;
            _soundManager = soundManager;

            _titleWin = new Text("Level Complete", _titleFont);
            _blurbWin = new Text("Congratulations, you won!", _generalFont);

            _titleLose = new Text("Game Over", _titleFont);
            _blurbLose = new Text("You lose... Please try again.", _generalFont);

            _score = new Text("Your Score: " + _gameData.Score, _generalFont);

            FormatText(_titleWin, 300);
            FormatText(_blurbWin, 200);

            FormatText(_titleLose, 300);
            FormatText(_blurbLose, 200);

            FormatText(_score, 100);
        }
Exemple #24
0
 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);
 }
Exemple #25
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);
 }
Exemple #26
0
 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);
 }
Exemple #27
0
 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);
 }
Exemple #28
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);
 }
Exemple #29
0
        public Explod(StateSystem statesystem, String label, TextSection textsection)
            : base(statesystem, label, textsection)
        {
            m_animationnumber = textsection.GetAttribute<Evaluation.PrefixedExpression>("anim", null);
            m_id = textsection.GetAttribute<Evaluation.Expression>("id", null);
            m_position = textsection.GetAttribute<Evaluation.Expression>("pos", null);
            m_postype = textsection.GetAttribute<PositionType>("postype", PositionType.P1);
            m_facing = textsection.GetAttribute<Evaluation.Expression>("facing", null);
            m_verticalfacing = textsection.GetAttribute<Evaluation.Expression>("vfacing", null);
            m_bindtime = textsection.GetAttribute<Evaluation.Expression>("BindTime", null);

            Evaluation.Expression exp_vel = textsection.GetAttribute<Evaluation.Expression>("vel", null);
            Evaluation.Expression exp_velocity = textsection.GetAttribute<Evaluation.Expression>("velocity", null);
            m_velocity = exp_vel ?? exp_velocity;

            m_acceleration = textsection.GetAttribute<Evaluation.Expression>("accel", null);
            m_randomdisplacement = textsection.GetAttribute<Evaluation.Expression>("random", null);
            m_removetime = textsection.GetAttribute<Evaluation.Expression>("removetime", null);
            m_supermove = textsection.GetAttribute<Evaluation.Expression>("supermove", null);
            m_supermovetime = textsection.GetAttribute<Evaluation.Expression>("supermovetime", null);
            m_pausemovetime = textsection.GetAttribute<Evaluation.Expression>("pausemovetime", null);
            m_scale = textsection.GetAttribute<Evaluation.Expression>("scale", null);
            m_spritepriority = textsection.GetAttribute<Evaluation.Expression>("sprpriority", null);
            m_drawontop = textsection.GetAttribute<Evaluation.Expression>("ontop", null);
            m_shadow = textsection.GetAttribute<Evaluation.Expression>("shadow", null);
            m_ownpalette = textsection.GetAttribute<Evaluation.Expression>("ownpal", null);
            m_removeongethit = textsection.GetAttribute<Evaluation.Expression>("removeongethit", null);
            m_explodignorehitpause = textsection.GetAttribute<Evaluation.Expression>("ignorehitpause", null);
            m_blending = textsection.GetAttribute<Blending>("trans", new Blending());
            m_alpha = textsection.GetAttribute<Evaluation.Expression>("alpha", null);
        }
Exemple #30
0
 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);
 }
Exemple #31
0
 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);
 }
Exemple #32
0
        void ParsePositionString(String input, out Evaluation.Expression expression, out BindToTargetPostion postype)
        {
            expression = null;
            postype    = BindToTargetPostion.None;

            if (input == null)
            {
                return;
            }

            Int32 sep_index = input.LastIndexOf(',');

            if (sep_index == -1)
            {
                expression = StateSystem.GetSubSystem <Evaluation.EvaluationSystem>().CreateExpression(input);
                return;
            }

            String str_exp     = input.Substring(0, sep_index).Trim();
            String str_postype = input.Substring(sep_index + 1).Trim();

            BindToTargetPostion bttp;

            if (StateSystem.GetSubSystem <StringConverter>().TryConvert(str_postype, out bttp) == true)
            {
                expression = StateSystem.GetSubSystem <Evaluation.EvaluationSystem>().CreateExpression(str_exp);
                postype    = bttp;
            }
            else
            {
                expression = StateSystem.GetSubSystem <Evaluation.EvaluationSystem>().CreateExpression(input);
            }
        }
Exemple #33
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);
 }
Exemple #34
0
        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);
            }
        }
Exemple #35
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);
 }
Exemple #36
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);
 }
Exemple #37
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);
 }
Exemple #38
0
        public void CreateState()
        {
            StateSystem stateSystem = new StateSystem();
            DrawSpriteState drawSpriteState = new DrawSpriteState();

            stateSystem.AddState("drawSprite", drawSpriteState);
            stateSystem.ChangeState("drawSprite");
        }
Exemple #39
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);
 }
Exemple #40
0
        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);
        }
Exemple #41
0
        TextureManager _textureManager; // 纹理控制器

        #endregion Fields

        #region Constructors

        public BattleStage1(StateSystem sys, TextureManager _t, SoundManagerEx _s)
        {
            _system = sys;               //状态机
            _textureManager = _t;        //纹理管理器
            soundmanager = _s;           //声音管理器

            player1 = new Players.BattlePlayer(_t, 0);  //实例化玩家
        }
Exemple #42
0
        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);
        }
Exemple #43
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);
 }
Exemple #44
0
    void Start()
    {
        gameStateSystem = SystemCache.Instance.gameStateSystem;
        stateSystem     = SystemCache.Instance.stateSystem;

        score = ScorePlayer();
        timer = wait_time;
    }
Exemple #45
0
        public void CreateState()
        {
            StateSystem     stateSystem     = new StateSystem();
            DrawSpriteState drawSpriteState = new DrawSpriteState();

            stateSystem.AddState("drawSprite", drawSpriteState);
            stateSystem.ChangeState("drawSprite");
        }
Exemple #46
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;
        }
Exemple #47
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);
 }
Exemple #48
0
 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);
 }
Exemple #49
0
        private static void InitializeStates()
        {
            stateSystem = new StateSystem();

            stateSystem.AddState("game", new GameState());

            stateSystem.SetCurrentState("game");
        }
Exemple #50
0
        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;
        }
Exemple #51
0
        Battle.Players.BattlePlayer player1;        // 玩家1


        public BattleStage1(StateSystem sys, TextureManager _t, SoundManagerEx _s)
        {
            _system         = sys;                     //状态机
            _textureManager = _t;                      //纹理管理器
            soundmanager    = _s;                      //声音管理器

            player1 = new Players.BattlePlayer(_t, 0); //实例化玩家
        }
Exemple #52
0
 public SetupStatePathCreation(Input input, StateSystem system, PathData pathData)
 {
     Gl.glEnable(Gl.GL_BLEND);
     Gl.glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA);
     _input    = input;
     _system   = system;
     _pathData = pathData;
 }
Exemple #53
0
 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);
 }
Exemple #54
0
        public void StateSystemUpdateTest()
        {
            stateSystemUpdate = new StateSystem();

            stateSystemUpdate.AddState("drawSprite", new DrawSpriteState());
            stateSystemUpdate.ChangeState("drawSprite");

            FastLoop fastLoop = new FastLoop(GameLoopTest);
        }
Exemple #55
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);
 }
Exemple #56
0
 public ReversalDef(StateSystem statesystem, String label, TextSection textsection)
     : base(statesystem, label, textsection)
 {
     m_pausetime = textsection.GetAttribute<Evaluation.Expression>("pausetime", null);
     m_sparknumber = textsection.GetAttribute<Evaluation.PrefixedExpression>("sparkno", null);
     m_hitsound = textsection.GetAttribute<Evaluation.PrefixedExpression>("hitsound", null);
     m_p1statenumber = textsection.GetAttribute<Evaluation.Expression>("p1stateno", null);
     m_p2statenumber = textsection.GetAttribute<Evaluation.Expression>("p2stateno", null);
     m_hitattr = textsection.GetAttribute<Combat.HitAttribute>("reversal.attr", null);
 }
Exemple #57
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);
        }
Exemple #58
0
 public PalFx(StateSystem statesystem, String label, TextSection textsection)
     : base(statesystem, label, textsection)
 {
     m_time = textsection.GetAttribute<Evaluation.Expression>("time", null);
     m_paladd = textsection.GetAttribute<Evaluation.Expression>("add", null);
     m_palmul = textsection.GetAttribute<Evaluation.Expression>("mul", null);
     m_sineadd = textsection.GetAttribute<Evaluation.Expression>("sinadd", null);
     m_palinvert = textsection.GetAttribute<Evaluation.Expression>("invertall", null);
     m_palcolor = textsection.GetAttribute<Evaluation.Expression>("color", null);
 }
Exemple #59
0
 public PlaySnd(StateSystem statesystem, String label, TextSection textsection)
     : base(statesystem, label, textsection)
 {
     m_soundid = textsection.GetAttribute<Evaluation.PrefixedExpression>("value", null);
     m_volume = textsection.GetAttribute<Evaluation.Expression>("volume", null);
     m_channel = textsection.GetAttribute<Evaluation.Expression>("channel", null);
     m_channelpriority = textsection.GetAttribute<Evaluation.Expression>("lowpriority", null);
     m_freqmul = textsection.GetAttribute<Evaluation.Expression>("freqmul", null);
     m_loop = textsection.GetAttribute<Evaluation.Expression>("loop", null);
     m_pan = textsection.GetAttribute<Evaluation.Expression>("pan", null);
     m_abspan = textsection.GetAttribute<Evaluation.Expression>("abspan", null);
 }
Exemple #60
0
        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;
            }
        }