protected override void Start() { // _skillSystem = new SkillSystem(this.gameObject); _stateSystem = new StateSystem(this.gameObject); //SkillInstance _instance = _skillSystem.Create(eSkillType.Normal, transform); //_skillSystem.Add(_instance); }
public void Awake() { if (stateManager == null) { stateManager = GameObject.Find("State System").GetComponent <StateSystem>(); } }
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); }
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 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 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); }
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); }
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) { } }
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 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; }
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 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 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.Unchanged); m_movetype = textsection.GetAttribute("movetype", MoveType.Unchanged); m_physics = textsection.GetAttribute("Physics", Physics.Unchanged); }
public void CheckHealth() { if (Program.map.Girl.health <= 0) { StateSystem.EndGame(); } }
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 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>(); }
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); }
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); }
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 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 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 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); }
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 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); }
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 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); }
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); } }
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 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 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 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 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 void CreateState() { StateSystem stateSystem = new StateSystem(); DrawSpriteState drawSpriteState = new DrawSpriteState(); stateSystem.AddState("drawSprite", drawSpriteState); stateSystem.ChangeState("drawSprite"); }
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 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); }
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); //实例化玩家 }
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); }
void Start() { gameStateSystem = SystemCache.Instance.gameStateSystem; stateSystem = SystemCache.Instance.stateSystem; score = ScorePlayer(); timer = wait_time; }
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 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); }
private static void InitializeStates() { stateSystem = new StateSystem(); stateSystem.AddState("game", new GameState()); stateSystem.SetCurrentState("game"); }
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; }
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); //实例化玩家 }
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; }
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); }
public void StateSystemUpdateTest() { stateSystemUpdate = new StateSystem(); stateSystemUpdate.AddState("drawSprite", new DrawSpriteState()); stateSystemUpdate.ChangeState("drawSprite"); FastLoop fastLoop = new FastLoop(GameLoopTest); }
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 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); }
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 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); }
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); }
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; } }