public void Load(EngineCore.Simulater.GState state) { var releaserData = ExcelToJSONConfigManager.Current.GetConfigByID <CharacterData> (1); var targetData = ExcelToJSONConfigManager.Current.GetConfigByID <CharacterData> (2); var releaserMagics = ExcelToJSONConfigManager .Current.GetConfigs <CharacterMagicData>(t => t.CharacterID == releaserData.ID).ToList(); var targetMagics = ExcelToJSONConfigManager .Current.GetConfigs <CharacterMagicData>(t => t.CharacterID == targetData.ID).ToList(); //throw new NotImplementedException (); var per = state.Perception as BattlePerception; var scene = UPerceptionView.Singleton.UScene; var releaser = per.CreateCharacter(1, releaserData, releaserMagics, 1, new UVector3(scene.startPoint.position.x, scene.startPoint.position.y, scene.startPoint.position.z), new UVector3(0, 90, 0), -1); var target = per.CreateCharacter(1, targetData, targetMagics, 2, new UVector3(scene.enemyStartPoint.position.x, scene.enemyStartPoint.position.y, scene.enemyStartPoint.position.z), new UVector3(0, -90, 0), -1); Gate.releaser = releaser; Gate.target = target; }
public static void Tick(GState state, GTime now) { if (state.Enable) { state.Tick(now); } else { throw new Exception("You can't tick a state before you start it."); } }
public GPerception(GState state) { this.State = state; }