public GraphAreaView() { InitializeComponent(); g_area.MouseOverAnimation = AnimationFactory.CreateMouseOverAnimation(MouseOverAnimation.Scale, .3); g_area.DeleteAnimation = AnimationFactory.CreateDeleteAnimation(DeleteAnimation.Shrink, .5); g_area.ShowAllEdgesLabels(true); }
public static T[] LoadAll <T>(String name) where T : UnityEngine.Object { if (AssetManagerForObb.IsUseOBB) { return(AssetManagerForObb.LoadAll <T>(name)); } if (typeof(T) != typeof(AnimationClip)) { return(null); } if (!AssetManager.UseBundles) { name = AnimationFactory.GetRenameAnimationDirectory(name); return(Resources.LoadAll <T>(name)); } if (AssetManager._animationInFolder.ContainsKey(name)) { List <String> list = AssetManager._animationInFolder[name]; T[] array = new T[list.Count]; for (Int32 i = 0; i < list.Count; i++) { String renameAnimationPath = AnimationFactory.GetRenameAnimationPath(list[i]); array[i] = AssetManager.Load <T>(renameAnimationPath, false); } return(array); } return(null); }
private void TileTransformScaleAnimation(double fromValue, double toValue) { var storyboard = new Storyboard(); var scale = new ScaleTransform(1.0, 1.0); var originX = ((ParentWidth / 2) - EndPoint.X) / ActualWidth + 1; var originY = ((ParentHeight / 2) - EndPoint.Y) / ActualHeight + 1; Debug.WriteLine(originX + " and " + originY + " and Name" + Name); RenderTransformOrigin = new Point(originX, originY); RenderTransform = scale; var scaleXAnimation = AnimationFactory.CreateDoubleAnimation(this, ScaleTransform.ScaleXProperty, toValue, fromValue, durationSpan: TimeSpan.FromMilliseconds(AnimationScaleTransformMs), easingFuction: EasingFunction); storyboard.Children.Add(scaleXAnimation); scaleXAnimation.Completed += ScaleXAnimationCompleted; Storyboard.SetTargetProperty(scaleXAnimation, new PropertyPath("RenderTransform.ScaleX")); Storyboard.SetTarget(scaleXAnimation, this); var scaleYAnimation = AnimationFactory.CreateDoubleAnimation(this, ScaleTransform.ScaleYProperty, toValue, fromValue, durationSpan: TimeSpan.FromMilliseconds(AnimationScaleTransformMs), easingFuction: EasingFunction); storyboard.Children.Add(scaleYAnimation); scaleYAnimation.Completed += ScaleYAnimationCompleted; Storyboard.SetTargetProperty(scaleYAnimation, new PropertyPath("RenderTransform.ScaleY")); Storyboard.SetTarget(scaleYAnimation, this); storyboard.Begin(); }
void UpdateTransformYAnimation(double animationTranformTimeSpan) { var positionAnimation = AnimationFactory.CreateDoubleAnimation(this, TranslateTransform.YProperty, -_currentYoffSet, durationSpan: TimeSpan.FromMilliseconds(animationTranformTimeSpan), easingFuction: EasingFunction); positionAnimation.Completed += PositionYAnimationCompleted; RenderTransform.BeginAnimation(TranslateTransform.YProperty, positionAnimation); }
public DefaultNotificationControl() { _duration = new DispatcherTimer(); _anim = AnimationFactory.CreateDoubleAnimation(0, 0, 1); InitializeComponent(); Init(Root); }
public override void OnUpdate() { bool complete = AnimationSystem.Instance.animCycle.AnimPlay(curAnimData, ref _irow); if (complete) { if (_curCmd == AnimationCMD.TurnOnAim) { //设置下一帧 OnExit(); AnimationFactory.GetAnimation <AimAnimationPlay>().HandleInput(AnimationCMD.Aim); } else { //设置下一帧 OnExit(); AnimationFactory.GetAnimation <IdleAnimationPlay>().HandleInput(AnimationCMD.None); } //子弹充满 } else { _irow++; } }
void ResizeWidthAnimation(double animationTimeSpan, KeySpline toKeySpline, KeySpline fromKeySpline, int beginTimeDelay) { var widthChangeAnimation = AnimationFactory.CreateDoubleAnimation(this, WidthProperty, toKeySpline, NewWidth, ActualWidth, fromKeySpline, durationSpan: TimeSpan.FromMilliseconds(animationTimeSpan), beginTimeSpan: TimeSpan.FromMilliseconds(beginTimeDelay)); widthChangeAnimation.Completed += WidthChangeAnimationCompleted; BeginAnimation(WidthProperty, widthChangeAnimation); }
public override void Update() { if (DateTime.Now > SecondsLater) { Animation = AnimationFactory.CreateAnimation(AnimationType.MazeBlue); } }
public OpenUOSDK(string path = "") { if (_ClientData == null && (path != "" || path != null)) { if (Directory.Exists(path)) { _ClientData = path; } } IoCContainer container = new IoCContainer(); container.RegisterModule <UltimaSDKCoreModule>(); container.RegisterModule <UltimaSDKBitmapModule>(); InstallLocation location = (_ClientData == null ? InstallationLocator.Locate().FirstOrDefault() : (InstallLocation)_ClientData); if (!Directory.Exists(location.ToString())) { Utility.PushColor(ConsoleColor.Red); Console.WriteLine("OpenUO Error: Client files not found."); Utility.PopColor(); } _animationDataFactory = new AnimationDataFactory(location, container); _animationFactory = new AnimationFactory(location, container); _artworkFactory = new ArtworkFactory(location, container); _asciiFontFactory = new ASCIIFontFactory(location, container); _clilocFactory = new ClilocFactory(location, container); _gumpFactory = new GumpFactory(location, container); _skillsFactory = new SkillsFactory(location, container); _soundFactory = new SoundFactory(location, container); _texmapFactory = new TexmapFactory(location, container); _unicodeFontFactory = new UnicodeFontFactory(location, container); }
void ResizeHeightAnimation(double animationTimeSpan, KeySpline toKeySpline, KeySpline fromKeySpline) { var heightChangeAnimation = AnimationFactory.CreateDoubleAnimation(this, HeightProperty, toKeySpline, NewHeight, ActualHeight, fromKeySpline, durationSpan: TimeSpan.FromMilliseconds(animationTimeSpan)); heightChangeAnimation.Completed += HeightChangeAnimationCompleted; BeginAnimation(HeightProperty, heightChangeAnimation); }
public static void AddAnimWithAnimatioName(GameObject go, String animationName) { Animation component = go.GetComponent <Animation>(); if (component.GetClip(animationName) == (UnityEngine.Object)null) { String[] array = animationName.Split(new Char[] { '_' }); String str = String.Concat(new String[] { "GEO_", array[1], "_", array[2], "_", array[3] }); String text = "Animations/" + str + "/" + animationName; text = AnimationFactory.GetRenameAnimationPath(text); AnimationClip clip = AssetManager.Load <AnimationClip>(text, false); component.AddClip(clip, animationName); } }
public BlockGrid(int cellWidth, int cellHeight, int rows, int cols) { _FreeBlocks = new List <BlockGroup>(); _ExplodeBlocks = new List <BlockGroup>(); _SuspendBlocks = new List <BlockGroup>(); _SwapBlocks = new List <BlockGroup[]>(); InactiveFreeGroups = new List <BlockGroup>(); InactiveExplodeGroups = new List <BlockGroup>(); InactiveSuspendGroups = new List <BlockGroup>(); InactiveSwapGroups = new List <BlockGroup[]>(); ExplodeQueue = new List <int[]>(); _Blocks = new Block[rows, cols]; _NumRows = rows; _NumCols = cols; _CellWidth = cellWidth; _CellHeight = cellHeight; _SelectorRow = rows / 2 - 1; _SelectorCol = cols / 2 - 1; Animation frame = AnimationFactory.GenerateAnimation(@"Block", 48, 48, 5, 0); blockSprite = new Sprite(frame, new Vector2(200, 200)); frame = AnimationFactory.GenerateAnimation(@"Selector", 104, 56, 1, 0); selectorSprite = new Sprite(frame, new Vector2(200, 200)); }
private void Awake() { _instance = this; normalAtk = transform.Find("NormalAtk").GetComponent <UIButton>(); magic1 = transform.Find("Magic1").GetComponent <UIButton>(); magic2 = transform.Find("Magic2").GetComponent <UIButton>(); magic3 = transform.Find("Magic3").GetComponent <UIButton>(); mask1 = magic1.transform.Find("Mask").GetComponentInChildren <UISprite>(); mask2 = magic2.transform.Find("Mask").GetComponentInChildren <UISprite>(); mask3 = magic3.transform.Find("Mask").GetComponentInChildren <UISprite>(); mask1.fillAmount = 0f; mask2.fillAmount = 0f; mask3.fillAmount = 0f; _factory = AnimationFactory.getAniFactory(); normalAtk.onClick.Add(new EventDelegate(this, "NormalAtkSkill")); magic1.onClick.Add(new EventDelegate(this, "MagicAtkSkill_1")); magic2.onClick.Add(new EventDelegate(this, "MagicAtkSkill_2")); magic3.onClick.Add(new EventDelegate(this, "MagicAtkSkill_3")); UIEventListener.Get(magic1.gameObject).onHover = ButtonOnHover; UIEventListener.Get(magic2.gameObject).onHover = ButtonOnHover; UIEventListener.Get(magic3.gameObject).onHover = ButtonOnHover; }
public override void OnCollision(GameObject other, Vec2 position) { if (!PendingDispose) { if (other is Projectile) { var proj = other as Projectile; if (!proj.PendingDispose) { GameWorld.AddGameObject(AnimationFactory.Create(position, "LaserExplosion")); Player.TotalScore++; Hp -= proj.Definition.Damage; if (Hp <= 0) { Player.TotalScore += _definition.ScoreValue; PendingDispose = true; DeathLocation = RigidBody.GetPosition(); DeathEffect.Play(); } } } } }
public CommandReader(string commands, Random random) { _animationFactory = new AnimationFactory(TypeSource <IAnimation> .FromThisAssembly()); _patternFactory = new PatternFactory(TypeSource <IPattern> .FromThisAssembly()); _timingFactory = new TimingFactory(TypeSource <ITiming> .FromThisAssembly()); _commands = commands; }
private void DropPosilkaDynamic(Vector3 moveTo) { flagPosilka = true; posilkaTimer = Time.time; if (VelocityHeadStart > 1) { VelocityPosilka = 0.6f; } else { VelocityPosilka = 0.2f; } SetRealVelocityWithNoDeltaTime(); posilka = Instantiate(PosilkaRight) as GameObject; Abstract posilkaAbstract = posilka.GetComponent <Abstract>(); posilkaAbstract.singleTransform.position = characterTransform.position + new Vector3(0, 2, 2); float flyTime = 0.3f / (GetRealVelocityWithNoDeltaTime() / startVelocity); if (moveTo.x > 0) { AnimationFactory.FlyXYZRotateXYZ(posilkaAbstract, moveTo, new Vector3(0f, 180f, 0f), flyTime, "FlyXYZRotateXYZ", "FlyXYZRotateXYZStop"); } else { AnimationFactory.FlyXYZRotateXYZ(posilkaAbstract, moveTo, new Vector3(0f, -180f, 0f), flyTime, "FlyXYZRotateXYZ", "FlyXYZRotateXYZStop"); } }
public static BaseGameObject CreateStaticObject(AnimationType type, int X, int Y) { Background result = null;; switch (type) { case AnimationType.MazeBlue: result = new Background() { Animation = AnimationFactory.CreateAnimation(AnimationType.MazeBlue) }; break; } if (result != null) { result.Name = type.ToString(); } result.Animation.Location = new Coordinate(X, Y); return(result); }
public override TargetedAnimation Create(Character owner) { var anim = AnimationFactory.CreateAttackAnimation(); anim.owner = owner; return(anim); }
private void UserControl_Loaded(object sender, RoutedEventArgs e) { if (DesignerProperties.GetIsInDesignMode(this)) { return; } if (!(DataContext is AbnormalityDuration ab)) { return; } _context = ab; _context.Refreshed += OnRefreshed; OnVisibilityChanged(Window.GetWindow(this), false); //if (_context.Abnormality.Hidden) Visibility = Visibility.Collapsed; if ((_context.Abnormality.Infinity || _context.Duration == uint.MaxValue) && DurationLabelRef != null) { DurationLabelRef.Visibility = Visibility.Hidden; } if (_context.Duration != uint.MaxValue && _context.Animated) { AnimateCooldown(); } BeginAnimation(OpacityProperty, AnimationFactory.CreateDoubleAnimation(100, from: 0, to: 1)); VisibilityChanged += OnVisibilityChanged; }
public void BigCoinEatenByPacman(bool BigCoinTimerOnOff) { var mazeWhite = AnimationFactory.CreateAnimation(AnimationType.MazeWhite); var mazeBlue = AnimationFactory.CreateAnimation(AnimationType.MazeBlue); if (BigCoinTimerOnOff) { Instance.background.Animation = mazeWhite; foreach (var ghost in Instance.ghost) { (ghost as GhostBace).SetBlueGhostState(); } } else { Instance.background.Animation = mazeBlue; foreach (var ghost in Instance.ghost) { (ghost as GhostBace).SetRegularGhostState(); } } if (BigCoinTimerOnOff) { } }
public void ShowAndPosition() { Dispatcher?.InvokeAsync(() => { FocusManager.PauseTopmost = true; var prevLeft = Left; var prevTop = Top; User32.GetCursorPos(out var pos); Show(); var currScreen = Screen.FromPoint(new Point(Convert.ToInt32(Left), Convert.ToInt32(Top))); double top = pos.Y; double left = pos.X + 20; if (top > currScreen.Bounds.Height / 2D) { top -= ActualHeight; } if (double.IsNaN(prevLeft)) { prevLeft = left; } if (double.IsNaN(prevTop)) { prevTop = top; } BeginAnimation(TopProperty, AnimationFactory.CreateDoubleAnimation(200, top, prevTop, true)); BeginAnimation(LeftProperty, AnimationFactory.CreateDoubleAnimation(200, left, prevLeft, true)); }); }
/// <summary> /// ctor /// </summary> /// <param name="def"></param> /// <param name="texture"></param> /// <param name="shape"></param> /// <param name="rigidBody"></param> public Alien(ContentManager contentManager, World world, GameData gameData, GameUtils gameUtils, AlienDefinition def, AnimationFactory animationFactory, GameWorld gameWorld, Texture2D texture, Shape shape, Body rigidBody, Player player, HealthBar healthBar) : base(world, texture, shape, rigidBody, 0, gameData, gameUtils) { ShootingEffect = contentManager.Load <SoundEffect>(def.ShootingEffect).CreateInstance(); ActiveEffect = contentManager.Load <SoundEffect>(def.ActiveEffect).CreateInstance(); DeathEffect = contentManager.Load <SoundEffect>(def.DeathEffect).CreateInstance(); Hp = def.MaxHp; AnimationFactory = animationFactory; GameWorld = gameWorld; _definition = def; RenderScale = new Vector2(def.Scale, def.Scale); //set initial distance to as far from the player as possible _lastDistanceToTarget = Vec2.Distance(Vec2.Zero, new Vec2(GameData.MaxXDimension, GameData.MaxYDimension)); HealthBar = healthBar; Player = player; }
void cbDebugMode_SelectionChanged(object sender, SelectionChangedEventArgs e) { switch (DebugMode) { case DebugModeEnum.Clean: CleanDMAnimations(); CleanDMERCurving(); CleanDMER(); break; case DebugModeEnum.Animations: CleanDMERCurving(); CleanDMER(); dg_Area.MoveAnimation = AnimationFactory.CreateMoveAnimation(MoveAnimation.Move, TimeSpan.FromSeconds(0.5)); dg_Area.MoveAnimation.Completed += dg_Area_GenerateGraphFinished; dg_Area.MouseOverAnimation = AnimationFactory.CreateMouseOverAnimation(MouseOverAnimation.Scale); dg_Area.DeleteAnimation = AnimationFactory.CreateDeleteAnimation(DeleteAnimation.Fade); break; case DebugModeEnum.EdgeRoutingEnabled: CleanDMAnimations(); CleanDMERCurving(); dg_Area.LogicCore.DefaultEdgeRoutingAlgorithm = EdgeRoutingAlgorithmTypeEnum.SimpleER; break; case DebugModeEnum.EdgeRoutingWithCurvingEnabled: CleanDMAnimations(); CleanDMER(); dg_Area.LogicCore.DefaultEdgeRoutingAlgorithm = EdgeRoutingAlgorithmTypeEnum.SimpleER; dg_Area.LogicCore.EdgeCurvingEnabled = true; break; } }
public DungeonInfoControl() { _bubbleScale = AnimationFactory.CreateDoubleAnimation(1000, from: .1, to: .9); _bubbleScale.EasingFunction = new ElasticEase(); _fadeIn = AnimationFactory.CreateDoubleAnimation(200, from: 0, to: 1); InitializeComponent(); }
public SettingsWindow() : base(false) { DataContext = new SettingsWindowViewModel(); InitializeComponent(); _bigPathSlideAnim = AnimationFactory.CreateDoubleAnimation(750, 0, -20, true); _bigPathFadeAnim = AnimationFactory.CreateDoubleAnimation(750, 1, 0, true); }
public static T[] LoadAll <T>(String name) where T : UnityEngine.Object { if (typeof(T) != typeof(AnimationClip)) { global::Debug.LogWarning("AssetManager::LoadAll<T>::Currently support only AnimationClip."); return(null); } name = AnimationFactory.GetRenameAnimationDirectory(name); T[] array = Resources.LoadAll <T>(name); if (array != null) { return(array); } if (AssetManagerForObb._animationInFolder.ContainsKey(name)) { List <String> list = AssetManagerForObb._animationInFolder[name]; T[] array2 = new T[list.Count]; for (Int32 i = 0; i < list.Count; i++) { String renameAnimationPath = AnimationFactory.GetRenameAnimationPath(list[i]); array2[i] = AssetManagerForObb.Load <T>(renameAnimationPath, false); } return(array2); } global::Debug.LogError("Cannot find " + name + " in bundles!!!"); return(null); }
public PlayerMenuWindow([NotNull] PlayerMenuViewModel vm) { _openAnim = AnimationFactory.CreateDoubleAnimation(150, 1); _closeAnim = AnimationFactory.CreateDoubleAnimation(150, 0, completed: (_, __) => { UnfriendConfirmRipple.Reset(); BlockConfirmRipple.Reset(); KickConfirmRipple.Reset(); GkickConfirmRipple.Reset(); _vm.Reset(); Hide(); }); _vm = vm; _vm.UnfriendConfirmationRequested += () => UnfriendConfirmRipple.Trigger(); _vm.BlockConfirmationRequested += () => BlockConfirmRipple.Trigger(); _vm.KickConfirmationRequested += () => KickConfirmRipple.Trigger(); _vm.GKickConfirmationRequested += () => GkickConfirmRipple.Trigger(); DataContext = _vm; Loaded += (_, __) => { var handle = new WindowInteropHelper(this).Handle; FocusManager.MakeUnfocusable(handle); FocusManager.HideFromToolBar(handle); }; InitializeComponent(); }
public void Update() { if (!this.firstTime) { return; } this.firstTime = false; FieldMap component = GameObject.Find("FieldMap").GetComponent <FieldMap>(); component.AddPlayer(); Actor actor = new Actor(); actor.idle = 200; actor.walk = 190; actor.run = 38; actor.turnl = 187; actor.turnr = 193; GameObject gameObject = GameObject.Find("Player"); FieldMapActorController component2 = gameObject.GetComponent <FieldMapActorController>(); AnimationFactory.AddAnimWithAnimatioName(gameObject, FF9DBAll.AnimationDB.GetValue((Int32)actor.idle)); AnimationFactory.AddAnimWithAnimatioName(gameObject, FF9DBAll.AnimationDB.GetValue((Int32)actor.walk)); AnimationFactory.AddAnimWithAnimatioName(gameObject, FF9DBAll.AnimationDB.GetValue((Int32)actor.run)); AnimationFactory.AddAnimWithAnimatioName(gameObject, FF9DBAll.AnimationDB.GetValue((Int32)actor.turnl)); AnimationFactory.AddAnimWithAnimatioName(gameObject, FF9DBAll.AnimationDB.GetValue((Int32)actor.turnr)); gameObject.GetComponent <Animation>().Play(FF9DBAll.AnimationDB.GetValue((Int32)actor.idle)); component2.originalActor = actor; }
public void Show() { gameObject.SetActive(true); singleTransform.localPosition = new Vector3(0f, 0f, -0.5f); singleTransform.localScale = new Vector3(0f, 0f, 0f); AnimationFactory.ScaleInXYZ(this, new Vector3(1f, 1f, 1f), 0.5f, "scaleIn", "ScaleInEnd"); }
public RoundSkillEffectControl() { _anim = AnimationFactory.CreateDoubleAnimation(0, from: 359.99, to: 0); InitializeComponent(); Loaded += OnLoaded; Unloaded += OnUnloaded; }
public void TestAnimationBitmapAdapter() { AnimationFactory factory = new AnimationFactory(Install, Container); Frame<Bitmap>[] frames = factory.GetAnimation<Bitmap>(1, 0, 0, 0, true); Guard.AssertIsNotNull(frames, "Animation 1 was not found."); Guard.AssertIsNotLessThan("Frames for animation 1, direction 0 were not found.", 1, frames.Length); }
public void TestAnimationWriteableBitmapAdapter() { var factory = new AnimationFactory(Install, Container); var frames = factory.GetAnimation<ImageSource>(1, 0, 0, 0, true); Guard.RequireIsNotNull(frames, "Animation 1 was not found."); Guard.RequireIsNotLessThan("Frames for animation 1, direction 0 were not found.", 1, frames.Length); }
public OpenUOSDK(string path = "") { if (ClientDataPath == null && !String.IsNullOrWhiteSpace(path)) { if (Directory.Exists(path)) { ClientDataPath = path; } } Container container = new Container(); container.RegisterModule<UltimaSDKCoreModule>(); container.RegisterModule<UltimaSDKBitmapModule>(); InstallLocation location = (ClientDataPath == null ? InstallationLocator.Locate().FirstOrDefault() : (InstallLocation)ClientDataPath); if (location == null || String.IsNullOrWhiteSpace(location) || !Directory.Exists(location.ToString())) { Utility.PushColor(ConsoleColor.Red); Console.WriteLine("OpenUO Error: Client files not found."); Utility.PopColor(); } AnimationDataFactory = new AnimationDataFactory(location, container); AnimationFactory = new AnimationFactory(location, container); ArtFactory = new ArtworkFactory(location, container); AsciiFontFactory = new ASCIIFontFactory(location, container); ClilocFactory = new ClilocFactory(location, container); GumpFactory = new GumpFactory(location, container); SkillsFactory = new SkillsFactory(location, container); SoundFactory = new SoundFactory(location, container); TexmapFactory = new TexmapFactory(location, container); UnicodeFontFactory = new UnicodeFontFactory(location, container); }
public override void Start() { base.Start(); var installs = InstallationLocator.Locate(); _spriteBatch = new SpriteBatch(GraphicsDevice) { VirtualResolution = new Vector3(_virtualResolution, 1) }; _artworkFactory = new ArtworkFactory(installs.First(), _container); _texmapFactory = new TexmapFactory(installs.First(), _container); _animationFactory = new AnimationFactory(installs.First(), _container); _gumpFactory = new GumpFactory(installs.First(), _container); _asciiFontFactory = new ASCIIFontFactory(installs.First(), _container); _unicodeFontFactory = new UnicodeFontFactory(installs.First(), _container); // register the renderer in the pipeline var scene = SceneSystem.SceneInstance.Scene; var compositor = ((SceneGraphicsCompositorLayers)scene.Settings.GraphicsCompositor); compositor.Master.Renderers.Add(new ClearRenderFrameRenderer()); compositor.Master.Renderers.Add(new SceneDelegateRenderer(RenderQuad)); }
public OpenUOSDK(string path = "") { if (_ClientData == null && (path != "" || path != null)) { if (Directory.Exists(path)) _ClientData = path; } IoCContainer container = new IoCContainer(); container.RegisterModule<UltimaSDKCoreModule>(); container.RegisterModule<UltimaSDKBitmapModule>(); InstallLocation location = (_ClientData == null ? InstallationLocator.Locate().FirstOrDefault() : (InstallLocation)_ClientData); if (!Directory.Exists(location.ToString())) { Utility.PushColor(ConsoleColor.Red); Console.WriteLine("OpenUO Error: Client files not found."); Utility.PopColor(); } _animationDataFactory = new AnimationDataFactory(location, container); _animationFactory = new AnimationFactory(location, container); _artworkFactory = new ArtworkFactory(location, container); _asciiFontFactory = new ASCIIFontFactory(location, container); _clilocFactory = new ClilocFactory(location, container); _gumpFactory = new GumpFactory(location, container); _skillsFactory = new SkillsFactory(location, container); _soundFactory = new SoundFactory(location, container); _texmapFactory = new TexmapFactory(location, container); _unicodeFontFactory = new UnicodeFontFactory(location, container); }
public override void Start() { base.Start(); var dataDirectory = Settings.UltimaOnline.DataDirectory; if (string.IsNullOrEmpty(dataDirectory) || !Directory.Exists(dataDirectory)) { using (var form = new SelectInstallForm("CoreAdapterTests")) { if (form.ShowDialog() == DialogResult.Cancel) { //TODO: End game } var version = form.SelectedInstall.Version; Settings.UltimaOnline.DataDirectory = dataDirectory = form.SelectedInstall.Directory; Settings.UltimaOnline.ClientVersion = version.ToString(); } } var install = new InstallLocation(dataDirectory); _spriteBatch = new SpriteBatch(GraphicsDevice) {VirtualResolution = new Vector3(_virtualResolution, 1)}; _artworkFactory = new ArtworkFactory(install, _container); _texmapFactory = new TexmapFactory(install, _container); _animationFactory = new AnimationFactory(install, _container); _gumpFactory = new GumpFactory(install, _container); _asciiFontFactory = new ASCIIFontFactory(install, _container); _unicodeFontFactory = new UnicodeFontFactory(install, _container); // register the renderer in the pipeline var scene = SceneSystem.SceneInstance.Scene; var compositor = ((SceneGraphicsCompositorLayers) scene.Settings.GraphicsCompositor); compositor.Master.Renderers.Add(new ClearRenderFrameRenderer()); compositor.Master.Renderers.Add(new SceneDelegateRenderer(RenderQuad)); }