// Use this for initialization void Start() { Main = this; TextBox = GameObject.Find("ScriptText").GetComponent <Text>(); InputField = GameObject.Find("ScriptField").GetComponent <InputField>(); InputField.text = File.ReadAllText(Application.streamingAssetsPath + "/script.lua"); TextOverlay = GameObject.Find("TextOverlay").GetComponent <Text>(); ColorSelectorSprite = GameObject.Find("ColorSelector").GetComponent <RawImage>(); UIGO = GameObject.Find("UICat"); DrawGO = GameObject.Find("DrawCat"); CodeGO = GameObject.Find("CodeCat"); AudioGO = GameObject.Find("AudioCat"); LevelGO = GameObject.Find("LevelCat"); InputText = GameObject.Find("ScriptText").GetComponent <Text>(); spriteImage = GameObject.Find("SpriteImage").GetComponent <RawImage>(); spriteImageScript = GameObject.Find("SpriteImage").GetComponent <DrawableImage>(); spriteMapScript = GameObject.Find("AllSprites").GetComponent <DrawableImage>(); spriteMapScript.Init(); AudioSpriteScript = GameObject.Find("AudioImage").GetComponent <DrawableImage>(); AudioSprite = GameObject.Find("AudioImage").GetComponent <RawImage>(); ReadAllColors(); ColorBlock c = InputField.colors; c.normalColor = colors[0]; c.highlightedColor = colors[0]; InputField.selectionColor = colors[3]; InputField.colors = c; TextBox.GetComponent <Text>().color = colors[3]; QualitySettings.vSyncCount = 0; Application.targetFrameRate = 60; LoadScript(InputField.text); realText = InputField.text; Color[] cs = new Color[6]; Texture2D tex = new Texture2D(3, 2); for (int i = 0; i < 6; i++) { cs[i] = new Color(UnityEngine.Random.value, UnityEngine.Random.value, UnityEngine.Random.value); //print(cs[i].r); } tex.SetPixels(cs); tex.filterMode = FilterMode.Point; tex.Apply(); ColorSelectorSprite.GetComponent <DrawableImage>().Init(); ColorSelectorSprite.texture = tex; }
internal void SetTexture(ClippingType clipping, int distance, Vector position, DrawableImage texture, DrawableImage mask) { Clipping = clipping; Distance = distance; Height = mask.Height; Name = mask.Name; Position = position; Id = mask.TextureIdentifier; Width = mask.Width; TextureId = texture.TextureIdentifier; TextureName = texture.Name; TextureWidth = texture.Width; TextureHeight = texture.Height; }
internal void SetPicture(DrawableImage pictureImage, Vector position, int distance, ClippingType clipping) { Position = position; Id = pictureImage.TextureIdentifier; Width = pictureImage.Width; Height = pictureImage.Height; Clipping = clipping; Distance = distance; Name = pictureImage.Name; TextureId = 0; TextureName = null; TextureWidth = 0; TextureHeight = 0; }
public DrawableBase(Base theBase, bool ally) : base(theBase) { Position = new Vector2(theBase.Rectangle.X + theBase.Rectangle.Width / 2f, theBase.Rectangle.Bottom); LifeBar = new DrawableBaseLifeBar(ally) { Position = new Vector2(0f, -250f), MaxHealth = theBase.MaxHealth, Health = theBase.Health }; Diamond = null; ticks = 0; }
protected override void OnLoad(Microsoft.Xna.Framework.Content.ContentManager content, Microsoft.Xna.Framework.Graphics.GraphicsDevice gd) { base.OnLoad(content, gd); // Add the gear and smoke. if (Structure.Team == Teams.Left) { AddChild(new DrawableImage(LEFT_IMAGE) { RelativeOrigin = new Vector2(0.5f, 1.0f) }, 2); DrawableImage gear = new DrawableImage("MapObjects/gearnexus") { RelativeOrigin = new Vector2(0.5f), Position = new Vector2(-70, -85) }; AddChild(gear); gear.PerformAction(new ActionSequence(ActionSequence.INFINITE_SEQUENCE, new ActionRotateBy(new TimeSpan(0, 0, 1), 20, false))); AddChild(new SmokeSystem() { Position = new Vector2(-80, -180) }); AddChild(new SmokeSystem() { Position = new Vector2(-13, -160) }); } else { AddChild(new DrawableImage(RIGHT_IMAGE) { RelativeOrigin = new Vector2(0.5f, 1f), Position = new Vector2(5, 5) }, 3); AddChild(Diamond = new DrawableImage("MapObjects/rbaseDiamond") { RelativeOrigin = new Vector2(0.5f, 1f), Position = new Vector2(5, -25) }, 2); } //Add the life bar AddChild(LifeBar, 3); }
public GameUI(CurrentChampionState ccs, PingCounter ping, GameScore score) { ChampionState = ccs; UIFPSCounter = new FPSCounter(); AddChild(UIFPSCounter, 2); UIPingCounter = ping; AddChild(UIPingCounter, 2); /*Map = new DrawableImage("UIObjects/map"); * AddChild(Map);*/ SpellBackground = new DrawableImage("UIObjects/spellBackground"); AddChild(SpellBackground); LifeDropshadow = new DrawableImage("UIObjects/lifeDrop"); LifeDropshadow.RelativeOrigin = new Vector2(0f, 1f); AddChild(LifeDropshadow); ResourceDropShadow = new DrawableImage("UIObjects/manaDrop"); ResourceDropShadow.RelativeOrigin = new Vector2(0f, 1f); //AddChild(ResourceDropShadow); Life = new DrawableImage("UIObjects/life"); Life.RelativeOrigin = new Vector2(0f, 1f); AddChild(Life); Resource = new DrawableImage("UIObjects/mana"); Resource.RelativeOrigin = new Vector2(0f, 1f); //AddChild(Resource); ScoreBackground = new DrawableImage("UIObjects/boxBackground"); AddChild(ScoreBackground); MoneyBackground = new DrawableImage("UIObjects/boxBackground"); AddChild(MoneyBackground); /*ObjectBackground = new DrawableImage("UIObjects/boxBackground"); * AddChild(ObjectBackground);*/ UISpellMenu = new SpellMenu(ChampionState); AddChild(UISpellMenu, 3); GameScore = score; }
private void SetScore() { Kills = new DrawableLabel() { Text = "0" }; Deaths = new DrawableLabel() { Text = "0" }; TeamKills = new DrawableLabel() { Text = "0", Tint = Color.Green }; TeamDeaths = new DrawableLabel() { Text = "0", Tint = Color.Red }; AddChild(Kills, 3); AddChild(Deaths, 3); AddChild(TeamKills, 3); AddChild(TeamDeaths, 3); Kills.SetPositionRelativeToObject(ScoreBackground, new Vector2(20, 10)); Deaths.SetPositionRelativeToObject(Kills, new Vector2(70, 0)); TeamKills.SetPositionRelativeToObject(Deaths, new Vector2(120, 0)); TeamDeaths.SetPositionRelativeToObject(TeamKills, new Vector2(70, 0)); DrawableImage killIcon = new DrawableImage("UIObjects/killIcon"); DrawableImage deathIcon = new DrawableImage("UIObjects/deathIcon"); DrawableImage teamKillIcon = new DrawableImage("UIObjects/killIcon"); AddChild(killIcon, 2); AddChild(deathIcon, 2); AddChild(teamKillIcon, 2); killIcon.SetPositionRelativeToObject(Kills, new Vector2(23, -2)); deathIcon.SetPositionRelativeToObject(Deaths, new Vector2(23, -2)); teamKillIcon.SetPositionRelativeToObject(TeamKills, new Vector2(23, -2)); }
public SpellMenuItem(SpellCastInfo info, DrawableImage icon) : base(new DrawableImage("UIObjects/spellBox"), new DrawableImage("UIObjects/spellBox"), new DrawableImage("UIObjects/spellBox")) { Clickable = false; //StateClicking.Position = new Vector2(2, 2); AddChild(new DrawableImage("UIObjects/spellBoxDropShadow") { Position = new Vector2(2, 2) }, 0); //ClickAction = () => Cast(); Info = info; CoolDown = new DrawableRectangle(new Rectangle((int)NORMAL_WIDTH / 2, (int)NORMAL_WIDTH, (int)NORMAL_WIDTH, (int)NORMAL_WIDTH), Color.Aqua); CoolDown.RelativeOrigin = new Vector2(0.5f, 1f); CoolDown.Alpha = 0.3f; AddChild(CoolDown, 3); Icon = icon; AddChild(Icon, 2); }
private void canvas_CreateResources(ICanvasAnimatedControl sender, CanvasCreateResourcesEventArgs args) { //Initialize image loader with canvas //TODO: The image manager may fail for multiple pages ImageManager.Initialize(sender); //Initialize random number generator randomNumbers = new Random(); //Initialize game systems drawIndex = new DrawableIndex(); collisions = new CollisionManager(); gameObjects = new GameObjectIndex(drawIndex, collisions); inputManager = new InputManager(); players = new PlayerRegistry(randomNumbers); //Load the required images ImageManager.LoadImages(PacmanImagePaths.Images); //Register key event listeners Window.Current.CoreWindow.KeyDown += canvas_KeyDown; Window.Current.CoreWindow.KeyUp += canvas_KeyUp; //Add background image DrawableImage background = new DrawableImage(ImageManager.getImageByName("background1"), Vector2.Zero, false); drawIndex.AddDrawable(background); //Create players player = new PlayerGameObject(new Vector2(200, 300), gameObjects, players, inputManager, KeyboardFormat.WASD); gameObjects.registerGameObject(player); player2 = new PlayerGameObject(new Vector2(250, 300), gameObjects, players, inputManager, KeyboardFormat.ARROWS); gameObjects.registerGameObject(player2); //Create a dummy game object //DummyGameObject testingObject = new DummyGameObject(new Vector2(100, 100), new Vector2(45, 45), gameObjects); //Register the new object in the game object index //gameObjects.registerGameObject(testingObject); //Register the new object as an input listener //Disable debug drawing drawIndex.SetDebugDrawing(false); //Add walls WallGameObject wall = new WallGameObject(new Vector2(0, 0), new Vector2(40, 500)); gameObjects.registerGameObject(wall); WallGameObject wall2 = new WallGameObject(new Vector2(0, 0), new Vector2(850, 20)); gameObjects.registerGameObject(wall2); WallGameObject wall3 = new WallGameObject(new Vector2(830, 0), new Vector2(850, 500)); gameObjects.registerGameObject(wall3); WallGameObject wall4 = new WallGameObject(new Vector2(0, 480), new Vector2(850, 500)); gameObjects.registerGameObject(wall4); WallGameObject wall5 = new WallGameObject(new Vector2(185, 165), new Vector2(200, 330)); gameObjects.registerGameObject(wall5); WallGameObject wall6 = new WallGameObject(new Vector2(185, 165), new Vector2(685, 180)); gameObjects.registerGameObject(wall6); WallGameObject wall7 = new WallGameObject(new Vector2(670, 165), new Vector2(685, 500)); gameObjects.registerGameObject(wall7); WallGameObject wall8 = new WallGameObject(new Vector2(345, 320), new Vector2(525, 330)); gameObjects.registerGameObject(wall8); //Add an enemy object /*EnemyGameObject enemy = new EnemyGameObject(new Vector2(700, 120), gameObjects, new Random()); * enemy.Target = player; * gameObjects.registerGameObject(enemy); * * * EnemyGameObject enemy1 = new EnemyGameObject(new Vector2(400, 200), gameObjects, new Random()); * enemy1.Target = player; * gameObjects.registerGameObject(enemy1); * * EnemyGameObject enemy2 = new EnemyGameObject(new Vector2(250, 300), gameObjects, new Random()); * enemy2.Target = player; * gameObjects.registerGameObject(enemy2); * * EnemyGameObject enemy3 = new EnemyGameObject(new Vector2(100, 350), gameObjects, new Random()); * enemy3.Target = player; * gameObjects.registerGameObject(enemy3); * * EnemyGameObject enemy4 = new EnemyGameObject(new Vector2(750, 400), gameObjects, new Random()); * enemy4.Target = player; * gameObjects.registerGameObject(enemy4);*/ }
private void SetupUserInterface() { BackgroundColor = Color.Black; NavigationPage.SetHasNavigationBar(this, false); colorButton = new Image { Source = Images.Paintbrush }; clockButton = new Image { Source = Images.ClockButton }; sendButton = new Image { Source = Images.SendMomentButton }; cancelButton = new Image { Source = Images.CancelButton, HorizontalOptions = LayoutOptions.Start, HeightRequest = 22, WidthRequest = 22 }; var moment = new Image { HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, }; moment.SetBinding(Image.SourceProperty, new Binding("Image", converter: new ByteArrayToImageSourceConverter())); var drawableMoment = new DrawableImage { BackgroundColor = Color.Transparent }; drawableMoment.SetBinding(DrawableImage.CurrentLineColorProperty, "PenColor"); mainLayout = new RelativeLayout() { Padding = new Thickness(0) }; mainLayout.Children.Add(moment, Constraint.Constant(0), Constraint.Constant(0), Constraint.RelativeToParent((parent) => { return(parent.Width); }), Constraint.RelativeToParent((parent) => { return(parent.Height); })); mainLayout.Children.Add(drawableMoment, Constraint.Constant(0), Constraint.Constant(0), Constraint.RelativeToParent((parent) => { return(parent.Width); }), Constraint.RelativeToParent((parent) => { return(parent.Height); })); mainLayout.Children.Add(colorButton, Constraint.RelativeToParent((parent) => { return(parent.Width - 40); }), Constraint.Constant(15), Constraint.Constant(30), Constraint.Constant(30)); mainLayout.Children.Add(cancelButton, Constraint.RelativeToParent((parent) => { return(15); }), Constraint.Constant(15), Constraint.Constant(30), Constraint.Constant(30)); mainLayout.Children.Add(clockButton, Constraint.Constant(15), Constraint.RelativeToParent((parent) => { return(parent.Height - 40); }), Constraint.Constant(30), Constraint.Constant(30)); mainLayout.Children.Add(sendButton, Constraint.RelativeToParent((parent) => { return(parent.Width - 40); }), Constraint.RelativeToParent((parent) => { return(parent.Height - 40); }), Constraint.Constant(30), Constraint.Constant(30)); picker = new MomentsPicker(); GetTimePickerItems(); SetupBindings(); mainLayout.Children.Add(picker, Constraint.Constant(15), Constraint.RelativeToParent((parent) => { return(parent.Height - 40); }), Constraint.Constant(30), Constraint.Constant(30)); Content = mainLayout; }
public ESCMenu() { State = MenuState.AllClosed; PlacementLayer = new Container(); MainBackgroundLayer = new Container(); VideoBackgroundLayer = new Container(); AudioBackgroundLayer = new Container(); // Main MenuItem main1 = new MenuItem(new DrawableLabel() { Text = "Video settings", RelativeOrigin = new Vector2(0.5f, 0.0f) }, new DrawableLabel() { Text = "Video settings", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Chocolate }, new DrawableLabel() { Text = "Video settings", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Aquamarine }) { ClickAction = () => OpenVideo() }; MenuItem main2 = new MenuItem(new DrawableLabel() { Text = "Audio settings", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Gray }, new DrawableLabel() { Text = "Audio settings", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Chocolate }, new DrawableLabel() { Text = "Audio settings", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Aquamarine }) { /*ClickAction = () => OpenAudio()*/ }; MenuItem main3 = new MenuItem(new DrawableLabel() { Text = "Return to Game", RelativeOrigin = new Vector2(0.5f, 0.0f) }, new DrawableLabel() { Text = "Return to Game", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Chocolate }, new DrawableLabel() { Text = "Return to Game", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Aquamarine }) { ClickAction = () => OpenOrCloseMainMenu(null, null) }; MenuItem main4 = new MenuItem(new DrawableLabel() { Text = "Exit Game", RelativeOrigin = new Vector2(0.5f, 0.0f) }, new DrawableLabel() { Text = "Exit Game", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Chocolate }, new DrawableLabel() { Text = "Exit Game", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Aquamarine }) { ClickAction = () => OpenExit() }; MainMenu = new Menu(main1, main2, main3, main4); MainMenu.AlignItemsVertically(30f); MainMenu.AllowKeyboard = true; // Audio MenuItem audio1 = new MenuItem(new DrawableLabel() { Text = "Less boomboom", RelativeOrigin = new Vector2(0.5f, 0.0f) }, new DrawableLabel() { Text = "Less boomboom", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Chocolate }, new DrawableLabel() { Text = "Less boomboom", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Aquamarine }); MenuItem audio2 = new MenuItem(new DrawableLabel() { Text = "More boomboom", RelativeOrigin = new Vector2(0.5f, 0.0f) }, new DrawableLabel() { Text = "More boomboom", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Chocolate }, new DrawableLabel() { Text = "More boomboom", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Aquamarine }); MenuItem audio3 = new MenuItem(new DrawableLabel() { Text = "Return to Main Menu", RelativeOrigin = new Vector2(0.5f, 0.0f) }, new DrawableLabel() { Text = "Return to Main Menu", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Chocolate }, new DrawableLabel() { Text = "Return to Main Menu", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Aquamarine }) { ClickAction = () => OpenOrCloseMainMenu(null, null) }; AudioMenu = new Menu(audio1, audio2, audio3); AudioMenu.AlignItemsVertically(30f); AudioMenu.AllowKeyboard = true; // Video MenuItem video1 = new MenuItem(new DrawableLabel() { Text = "Big Texture", RelativeOrigin = new Vector2(0.5f, 0.0f) }, new DrawableLabel() { Text = "Big Texture", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Chocolate }, new DrawableLabel() { Text = "Big Texture", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Aquamarine }) { ClickAction = () => screenService.GameWindowSize = screenService.ScreenSize }; MenuItem video2 = new MenuItem(new DrawableLabel() { Text = "Small Texture", RelativeOrigin = new Vector2(0.5f, 0.0f) }, new DrawableLabel() { Text = "Small Texture", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Chocolate }, new DrawableLabel() { Text = "Small Texture", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Aquamarine }) { ClickAction = () => screenService.GameWindowSize = new Vector2(900, 700) }; MenuItem video25 = new MenuItem(new DrawableLabel() { Text = "Fullscreen", RelativeOrigin = new Vector2(0.5f, 0.0f) }, new DrawableLabel() { Text = "Fullscreen", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Chocolate }, new DrawableLabel() { Text = "Fullscreen", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Aquamarine }) { ClickAction = () => screenService.SwitchFullscreen() }; MenuItem video3 = new MenuItem(new DrawableLabel() { Text = "Return to Main Menu", RelativeOrigin = new Vector2(0.5f, 0.0f) }, new DrawableLabel() { Text = "Return to Main Menu", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Chocolate }, new DrawableLabel() { Text = "Return to Main Menu", RelativeOrigin = new Vector2(0.5f, 0.0f), Tint = Color.Aquamarine }) { ClickAction = () => OpenOrCloseMainMenu(null, null) }; VideoMenu = new Menu(video1, video2, video25, video3); VideoMenu.AlignItemsVertically(30f); VideoMenu.AllowKeyboard = true; // Exit MenuItem exit1 = new MenuItem(new DrawableLabel() { Text = "No" }, new DrawableLabel() { Text = "Nice", Tint = Color.Chocolate }, new DrawableLabel() { Text = "Nice", Tint = Color.Aquamarine }) { ClickAction = () => OpenOrCloseMainMenu(null, null) }; MenuItem exit2 = new MenuItem(new DrawableLabel() { Text = "Yes" }, new DrawableLabel() { Text = "Why", Tint = Color.Chocolate }, new DrawableLabel() { Text = "Why", Tint = Color.Aquamarine }) { ClickAction = () => { Screen s = GetScreen(); if (s != null) { s.Exit = true; } else { Debug.Fail("It should has a screen"); } } }; //Exit ExitMenu = new Menu(exit1, exit2); ExitMenu.AlignItemsHorizontally(80); ExitMenu.AllowKeyboard = true; ExitMenu.Position = new Vector2(160, 95); ExitLayer = new Container(); ExitBackground = new DrawableImage("UIObjects/menuExit"); ExitLayer.Visible = false; // Exit gear GearExit = new DrawableImage("UIObjects/menuGear"); GearExit.Scale = new Vector2(0.9f, 0.9f); GearExit.RelativeOrigin = new Vector2(0.5f, 0.5f); GearExit.Position = new Vector2(25, 130); GearExit.PerformAction(new ActionSequence(-1, new ActionRotateBy(new TimeSpan(0, 0, 0, 0, 350), 2, false), new ActionRotateBy(new TimeSpan(0, 0, 0, 0, 200), 18, false), new ActionDelay(new TimeSpan(0, 0, 0, 0, 450)))); GearExit2 = new DrawableImage("UIObjects/menuGear"); GearExit2.Scale = new Vector2(0.8f, 0.8f); GearExit2.RelativeOrigin = new Vector2(0.5f, 0.5f); GearExit2.Position = new Vector2(200, 130); GearExit2.PerformAction(new ActionSequence(-1, new ActionRotateBy(new TimeSpan(0, 0, 0, 0, 350), 2, false), new ActionRotateBy(new TimeSpan(0, 0, 0, 0, 200), 18, false), new ActionDelay(new TimeSpan(0, 0, 0, 0, 450)))); GearExitMini = new DrawableImage("UIObjects/menuGear"); GearExitMini.Scale = new Vector2(0.6f, 0.6f); GearExitMini.RelativeOrigin = new Vector2(0.5f, 0.5f); GearExitMini.Position = new Vector2(115, 130); GearExitMini.PerformAction(new ActionSequence(-1, new ActionRotateBy(new TimeSpan(0, 0, 0, 0, 350), -2, false), new ActionRotateBy(new TimeSpan(0, 0, 0, 0, 200), -18, false), new ActionDelay(new TimeSpan(0, 0, 0, 0, 450)))); //Main MainBackground = new DrawableImage("UIObjects/menu"); MainBackgroundLayer.Visible = false; MainMenu.Position = new Vector2(100, 25); // Main gear GearMain = new DrawableImage("UIObjects/menuGear"); GearMain.RelativeOrigin = new Vector2(0.5f, 0.5f); GearMain.Position = new Vector2(25, 35); GearMain.PerformAction(new ActionSequence(-1, new ActionRotateBy(new TimeSpan(0, 0, 0, 0, 350), 2, false), new ActionRotateBy(new TimeSpan(0, 0, 0, 0, 200), 18, false), new ActionDelay(new TimeSpan(0, 0, 0, 0, 450)))); GearMiniMain = new DrawableImage("UIObjects/menuGear"); GearMiniMain.Scale = new Vector2(0.5f, 0.5f); GearMiniMain.RelativeOrigin = new Vector2(0.5f, 0.5f); GearMiniMain.Position = new Vector2(13, 115); GearMiniMain.PerformAction(new ActionSequence(-1, new ActionRotateBy(new TimeSpan(0, 0, 0, 0, 350), -2, false), new ActionRotateBy(new TimeSpan(0, 0, 0, 0, 200), -18, false), new ActionDelay(new TimeSpan(0, 0, 0, 0, 450)))); //Audio AudioBackground = new DrawableImage("UIObjects/menuAudio"); AudioBackgroundLayer.Visible = false; AudioMenu.Position = new Vector2(130, 27); // Audio gear GearAudio = new DrawableImage("UIObjects/menuGear"); GearAudio.RelativeOrigin = new Vector2(0.5f, 0.5f); GearAudio.Position = new Vector2(130, 35); GearAudio.PerformAction(new ActionSequence(-1, new ActionRotateBy(new TimeSpan(0, 0, 0, 0, 350), 2, false), new ActionRotateBy(new TimeSpan(0, 0, 0, 0, 200), 18, false), new ActionDelay(new TimeSpan(0, 0, 0, 0, 450)))); //Video VideoBackground = new DrawableImage("UIObjects/menuVideo"); VideoBackgroundLayer.Visible = false; VideoMenu.Position = new Vector2(150, 25); //Gear GearVideo = new DrawableImage("UIObjects/menuGear"); GearVideo.Scale = new Vector2(0.6f, 0.6f); GearVideo.RelativeOrigin = new Vector2(0.5f, 0.5f); GearVideo.Position = new Vector2(290, 130); GearVideo.PerformAction(new ActionSequence(-1, new ActionRotateBy(new TimeSpan(0, 0, 0, 0, 350), 2, false), new ActionRotateBy(new TimeSpan(0, 0, 0, 0, 200), 18, false), new ActionDelay(new TimeSpan(0, 0, 0, 0, 450)))); // Gear2 GearVideo2 = new DrawableImage("UIObjects/menuGear"); GearVideo2.Scale = new Vector2(0.6f, 0.6f); GearVideo2.RelativeOrigin = new Vector2(0.5f, 0.5f); GearVideo2.Position = new Vector2(250, 170); GearVideo2.PerformAction(new ActionSequence(-1, new ActionRotateBy(new TimeSpan(0, 0, 0, 0, 350), -2, false), new ActionRotateBy(new TimeSpan(0, 0, 0, 0, 200), -18, false), new ActionDelay(new TimeSpan(0, 0, 0, 0, 450)))); }
internal Picture(DrawableImage pictureImage, Vector position, int distance, ClippingType clipping) { SetPicture(pictureImage, position, distance, clipping); }
internal Picture(ClippingType clipping, int distance, Vector position, DrawableImage texture, DrawableImage mask) { SetTexture(clipping, distance, position, texture, mask); }