public override void Start() { GameObject Bubble = new GameObject(); Bubble.Tag = "Bubble"; Bubble.AddComponent <Transform>(new Transform()); Bubble.AddComponent <SpriteRenderer>(new SpriteRenderer()); Bubble.AddComponent <CircleCollider>(new CircleCollider(Radius)); //Bubble.AddComponent<Text>(new Text("0", SF)); Bubble.Layer = 0.75f; Bubble.Start(); Bubble.GetComponent <SpriteRenderer>().Sprite.Texture = HitBoxDebuger.CreateCircleTextureShell(Radius, (int)(Radius * 0.9f), color); Bubble.GetComponent <SpriteRenderer>().Sprite.SetCenterAsOrigin(); Bubble.Transform.Position = new Vector2(Setup.graphics.PreferredBackBufferWidth - FinalDimensions.X + Radius * 2, Setup.graphics.PreferredBackBufferHeight - FinalDimensions.Y + Radius * 2) / 2; //Bubble.GetComponent<Text>().Color = Color.Black; NameGenerator NG = new NameGenerator(""); for (int i = 0; i < Dimensions.Y; i++) { for (int j = 0; j < Dimensions.X; j++) { GameObject Instance = GameObject.Instantiate(Bubble); //Instance.GetComponent<Text>().text = NG.GenerateName().Replace(" ", ""); Instance.Transform.Position += new Vector2(j * (Radius * 2 + Spacing), i * (Radius * 2 + Spacing)); } } }
public override void Start() { Arrow = Scene.GuiRenderer.BindTexture(Setup.Content.Load <Texture2D>("Icons\\Arrow")); ScaleGizmo = Scene.GuiRenderer.BindTexture(Setup.Content.Load <Texture2D>("Icons\\ScaleGizmo")); RotationGizmo = Scene.GuiRenderer.BindTexture(HitBoxDebuger.CreateCircleTextureShell(64, 62, Microsoft.Xna.Framework.Color.LightYellow)); }