コード例 #1
0
		protected override void OnStart()
		{
			Texture2D texture = Engine.Graphics.CreateTexture2D("ListCursor.png");
			parent = new TextureObject2D()
			{
				Texture = texture
			};
			child = new TextureObject2D()
			{
				Texture = texture
			};
			
			parent.AddChild(child, ChildManagementMode.Nothing, ChildTransformingMode.Position);

			Engine.AddObject2D(parent);
			Engine.AddObject2D(child);
		}
コード例 #2
0
        protected override void OnStart()
        {
            obj = new TextureObject2D()
            {
                Position = new Vector2DF(200, 200),
                Texture = Engine.Graphics.CreateTexture2D(CloudTexturePath),
            };
            Engine.AddObject2D(obj);

            child = new TextureObject2D()
            {
                Position = new Vector2DF(10, 10),
                Texture = Engine.Graphics.CreateTexture2D(CloudTexturePath),
            };
            obj.AddChild(child, ChildMode.Position);
            Engine.AddObject2D(child);

            coroutine = GetFlow();
        }
コード例 #3
0
		protected override void OnStart()
		{
			Texture2D texture = Engine.Graphics.CreateTexture2D("ListCursor.png");
			item = new TextureObject2D()
			{
				Texture = texture,
				Position = new Vector2DF(0, 0),
				Color = new Color(255, 0, 0),
			};
			parent = new TextureObject2D()
			{
				Texture = texture,
				Position = new Vector2DF(0, 40),
				Color = new Color(0, 255, 0),
			};
			parent2 = new TextureObject2D()
			{
				Texture = texture,
				Position = new Vector2DF(0, 80),
				Color = new Color(128, 128, 128),
			};
			parent3 = new TextureObject2D()
			{
				Texture = texture,
				Position = new Vector2DF(0, 120),
				Color = new Color(128, 0, 0),
			};
			child = new TextureObject2D()
			{
				Texture = texture,
				Position = new Vector2DF(450, 0),
			};
			
			parent.AddChild(child, ChildManagementMode.Nothing, ChildTransformingMode.Position);

			Engine.AddObject2D(item);
			Engine.AddObject2D(parent);
			Engine.AddObject2D(parent2);
			Engine.AddObject2D(parent3);
			Engine.AddObject2D(child);
		}
コード例 #4
0
ファイル: ParentObject.cs プロジェクト: Pctg-x8/Altseed
        protected override void OnStart()
        {
            var scene = new Scene();
            var layer = new Layer2D();
            var child = new TextureObject2D();
            parent = new TextureObject2D();

            parent.AddChild( child, ChildMode.All );
            layer.AddObject( parent );
            layer.AddObject( child );
            scene.AddLayer( layer );
            Engine.ChangeScene( scene );

            var texture = Engine.Graphics.CreateTexture2D( CloudTexturePath );

            parent.Position = new Vector2DF( 320, 240 );
            parent.CenterPosition = new Vector2DF( 128, 128 );
            parent.Texture = texture;

            child.Position = new Vector2DF( 50, 50 );
            child.Texture = texture;
        }