Пример #1
0
        public Tile(string fileName, Vector2 position) : base("Tile")
        {
            Transform.Position = position;
            renderer           = new SpriteRenderer(FlyWeight.Get(fileName));

            AddComponent(renderer);
        }
Пример #2
0
 public Text2D(string spriteSheetText, string message, Vector2 position, Vector4 color, float horizontalSpacing, Camera camera = null) : base()
 {
     RenderOffset = (int)RenderLayer.Gui_00;
     text         = new TextMesh(FlyWeight.Get(spriteSheetText));
     text.SetTextColor(color);
     text.SetHorizontalSpacing(horizontalSpacing);
     text.position = position;
     text.Camera   = camera;
     this.message  = message;
 }
Пример #3
0
 public SpriteRenderer(string fileName, GameObject owner) : base(owner)
 {
     sprite  = new Sprite(1, 1);
     texture = FlyWeight.Get(fileName);
 }
Пример #4
0
 public void SetTexture(string p)
 {
     Texture = FlyWeight.Get(p);
 }