当前位置: 首页>>代码示例>>C#>>正文


C# IDrawable类代码示例

本文整理汇总了C#中IDrawable的典型用法代码示例。如果您正苦于以下问题:C# IDrawable类的具体用法?C# IDrawable怎么用?C# IDrawable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IDrawable类属于命名空间,在下文中一共展示了IDrawable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Draw

 /// <summary>
 /// Draws out the particle with the given drawable at the
 /// particle's position.
 /// </summary>
 public void Draw(IDrawable drawable, DrawingArgs args)
 {
     double ratio = secondsRemaining / Constants.MaxSwarmParticleLife;
     Color c = Color.FromArgb((int) (ratio * 255.0), Color.White);
     PointF p = new PointF(CurrentX, CurrentY);
     drawable.Draw(p, c, args.BackendDrawingArgs);
 }
开发者ID:dmoonfire,项目名称:cutegod,代码行数:11,代码来源:SwarmParticle.cs

示例2: BeamRenderer

 public BeamRenderer(int count, IDrawable part, Vector3 dist)
 {
     Count = count;
     Part = part;
     Distance = dist;
     Offset = Matrix4Extensions.FromTranslation(Distance);
 }
开发者ID:cody82,项目名称:spacewar-arena,代码行数:7,代码来源:effects.cs

示例3: GlListDrawable

 public GlListDrawable(IDrawable drawable)
 {
     if (drawable == null) { throw new ArgumentNullException("drawable"); }
     this.refresh = -1;
     this.drawable = drawable;
     this.bufferedDrawable = drawable as BufferedDrawable;
 }
开发者ID:timdetering,项目名称:Physics2D.Net,代码行数:7,代码来源:GlListDrawable.cs

示例4: AddObject

 internal static void AddObject (IDrawable obj)
 {
     var client = CallContext.Client;
     if (!objects.ContainsKey (client))
         objects [client] = new List<IDrawable> ();
     objects [client].Add (obj);
 }
开发者ID:paperclip,项目名称:krpc,代码行数:7,代码来源:Addon.cs

示例5: TileDrawable

        /// <summary>
        /// Constructs the tile drawable object.
        /// </summary>
        public TileDrawable(
			Tile tile,
			IDrawable drawable)
        {
            this.tile = tile;
            this.drawable = drawable;
        }
开发者ID:dmoonfire,项目名称:wordplay,代码行数:10,代码来源:TileDrawable.cs

示例6: Add

 public void Add(IDrawable drawable)
 {
     if (drawable == null) throw new ArgumentNullException("drawable"); 
     lock (_drawingsSync) {
         _grpdrawings.Add(drawable);
     }
 }
开发者ID:ElderByte-,项目名称:Archimedes.Geometry,代码行数:7,代码来源:DrawingGroup.cs

示例7: remove

 public IDrawable remove(IDrawable d)
 {
     bool removed=myDrawables.Remove(d);
     if (index >= myDrawables.Count)
         index = 0;
     return removed?d:null;
 }
开发者ID:jjaspe,项目名称:Libraries,代码行数:7,代码来源:World.cs

示例8: Drawable

 public Drawable(Generator g)
     : base(g, typeof(IDrawable), false)
 {
     inner = (IDrawable)Handler;
     inner.Create ();
     Initialize ();
 }
开发者ID:M1C,项目名称:Eto,代码行数:7,代码来源:Drawable.cs

示例9: Computer

 public Computer(CPU cpu, RAM ram, HardDriver hardDriver, IDrawable videoCard)
 {
     this.CPU = cpu;
     this.RAM = ram;
     this.HardDrives = hardDriver;
     this.VideoCard = videoCard;
  }
开发者ID:damy90,项目名称:Telerik-all,代码行数:7,代码来源:Computer.cs

示例10: IntersectWith

        public Direction IntersectWith(IDrawable obj)
        {
            if ((this.Position.Left > obj.Position.Left && this.Position.Left < obj.Position.Left + obj.Size.Width)
                || (this.Position.Left + this.Size.Width > obj.Position.Left && this.Position.Left + this.Size.Width < obj.Position.Left + obj.Size.Width)
                || (this.Position.Left == obj.Position.Left && this.Position.Left + this.Size.Width == obj.Position.Left + obj.Size.Width))
            {
                if (this.Position.Top + this.Size.Height >= obj.Position.Top && this.Position.Top + this.Size.Height < obj.Position.Top + obj.Size.Height)
                {
                    return Direction.Down;
                }

                if (this.Position.Top <= obj.Position.Top + obj.Size.Height && this.Position.Top > obj.Position.Top)
                {
                    return Direction.Up;
                }
            }

            if ((this.Position.Top > obj.Position.Top && this.Position.Top < obj.Position.Top + obj.Size.Height)
                || (this.Position.Top + this.Size.Height > obj.Position.Top && this.Position.Top + this.Size.Height < obj.Position.Top + obj.Size.Height)
                || (this.Position.Top == obj.Position.Top && this.Position.Top + this.Size.Height == obj.Position.Top + obj.Size.Height))
            {
                if (this.Position.Left <= obj.Position.Left + obj.Size.Width && this.Position.Left > obj.Position.Left)
                {
                    return Direction.Left;
                }

                if (this.Position.Left + this.Size.Width >= obj.Position.Left && this.Position.Left + this.Size.Width < obj.Position.Left + obj.Size.Width)
                {
                    return Direction.Right;
                }
            }

            return Direction.None;
        }
开发者ID:plmng,项目名称:SoftUni_OOP_HWs,代码行数:34,代码来源:GameObject.cs

示例11: RemoveObject

 internal static void RemoveObject (IDrawable obj)
 {
     var client = CallContext.Client;
     if (!objects.ContainsKey (client) || !objects [client].Contains (obj))
         throw new ArgumentException ("Drawing object not found");
     obj.Destroy ();
     objects [client].Remove (obj);
 }
开发者ID:paperclip,项目名称:krpc,代码行数:8,代码来源:Addon.cs

示例12: unregister

 public bool unregister(IDrawable component)
 {
     if (isRegistered(component)) {
         list.Remove(component);
         return true;
     }
     return false;
 }
开发者ID:rpfypust,项目名称:RealisticPerspective,代码行数:8,代码来源:GUIManager.cs

示例13: Image

		public Image( IDrawable drawable, Scaling scaling = Scaling.Stretch, int align = AlignInternal.center )
		{
			setDrawable( drawable );
			_scaling = scaling;
			_align = align;
			setSize( preferredWidth, preferredHeight );
			touchable = Touchable.Disabled;
		}
开发者ID:RastaCow,项目名称:Nez,代码行数:8,代码来源:Image.cs

示例14: register

 public bool register(IDrawable component)
 {
     if (!isRegistered(component)) {
         list.Add(component);
         list.Sort((x, y) => priority(x).CompareTo(priority(y)));
         return true;
     }
     return false;
 }
开发者ID:rpfypust,项目名称:RealisticPerspective,代码行数:9,代码来源:GUIManager.cs

示例15: SetParameters

        public virtual void SetParameters(IDrawable a_renderable)
        {
            if (SetUserParameters != null)
            {
                SetUserParameters(BackingEffect, a_renderable);
            }

            BackingEffect.CommitChanges();
        }
开发者ID:kirlianstudios,项目名称:armada,代码行数:9,代码来源:Effect.cs


注:本文中的IDrawable类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。