public Tile(string fileName, Vector2 position) : base("Tile") { Transform.Position = position; renderer = new SpriteRenderer(FlyWeight.Get(fileName)); AddComponent(renderer); }
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; }
public SpriteRenderer(string fileName, GameObject owner) : base(owner) { sprite = new Sprite(1, 1); texture = FlyWeight.Get(fileName); }
public void SetTexture(string p) { Texture = FlyWeight.Get(p); }