Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void CreateShape(GameObject gameObject, SpriteRenderer[] images, Vector2 pos, Quaternion rot)
- {
- Prefab = gameObject;
- InnerImages = images;
- Position = pos;
- Rotation = rot;
- }
- Shape GetShape()
- {
- return this;
- }
- void SetShapePosition(Vector2 pos)
- {
- Position = pos;
- }
- public Shape SetShapeRandomColours(Color[] colors, Shape shape)
- {
- if(colors.Length != 0)
- {
- foreach(SpriteRenderer sr in shape.InnerImages)
- {
- sr.color = colors[GetRandom(colors.Length)];
- }
- }else{
- Debug.Log("NO COLOURS TO RANDOMISE>..");
- }
- return shape;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement