public static void spawnPlayer(Player player)
        {
            Text3D text3d = new Text3D(player, 2000, Types.ColorRGBA.Red, player.World, new Types.Vec3f(0, 100, 0));

            text3d.addRow("Test1", 10000);
            text3d.addRow("Test2", 12000);
            text3d.addRow("Test3", 14000);
            text3d.addRow("Test4", 16000);
            text3d.addRow("Test5", 18000);
            text3d.show();

            PlayerText playerText = new PlayerText(player);

            playerText.addRow("Okay", 80000);
            playerText.addRow("Okay2", 80000);
            playerText.addRow("Okay3", 80000);
            playerText.addRow("Okay4", 80000);
            playerText.addRow("Okay5", 80000);
            playerText.addRow("Okay6", 80000);
            playerText.addRow("Okay7", 80000);
            playerText.addRow("Okay8", 80000);
            playerText.addRow("Okay9", 80000);
            playerText.addRow("Okay10", 80000);
            playerText.addRow("Okay11", 80000);
            playerText.show();
        }
Example #2
0
 // Start is called before the first frame update
 void Start()
 {
     anim         = gameObject.GetComponent <Animator>();
     puzzle       = pipesPuzzle.GetComponent <PipesPuzzle>();
     playerText   = GameObject.Find("PlayerText").GetComponent <PlayerText>();
     plantWatered = false;
 }
Example #3
0
    // Use this for initialization
	void Start ()
	{
        rb = GetComponent<Rigidbody2D>();
	    boxCollider = GetComponent<BoxCollider2D>();
        playerText = GameObject.Find("Zaal").GetComponent<PlayerText>();
        dayController = GameObject.Find("GameManager").GetComponent<DayController>();

        cowController = GameObject.Find("CowContainer").GetComponent<CowController>();
        cowActions = new CowAction[4];
        cowActions[0] = () => { };
        cowActions[1] = cowController.AccelerateCows;
        cowActions[2] = cowController.ReverseCows;
        cowActions[3] = cowController.AlternateCowPaths;

	    GameObject planeObject = GameObject.Find("PlaneContainer");
        planeActions = new PlaneAction[4];
	    if (planeObject != null)
	    {
	        planeController = planeObject.GetComponent<PlaneController>();
            planeActions[0] = () => { };
            planeActions[1] = planeController.AcceleratePlane;
            planeActions[2] = planeController.ReversePlane;
            planeActions[3] = planeController.AlternatePlanePath;
	    }
	}
Example #4
0
 void Awake()
 {
     playerText = GameObject.Find("Textbox").GetComponent<PlayerText>();
     dayController = GameObject.Find("GameManager").GetComponent<DayController>();
     task1 = GameObject.Find("AlarmClock").GetComponent<InteractiveObject>();
     task2 = GameObject.Find("Microwave").GetComponent<InteractiveObject>();
     task3 = GameObject.Find("Dresser").GetComponent<InteractiveObject>();
 }
Example #5
0
 public void OnCollisionStay2D(Collision2D collision)
 {
     text   = collision.gameObject.GetComponent <PlayerText>();
     player = collision.gameObject.GetComponent <PlayerController>();
     pb     = collision.gameObject.GetComponent <Playerbadges>();
     if (zpressed == true && molenotrun == false)
     {
         StartCoroutine(intro0());
     }
 }
Example #6
0
 void RightAnswer()
 {
     canvasAnimation.RightAnwer();
     ShowScore.scoreValue += 10;
     //barTime.time += 10;
     correct            = true;
     answered           = true;
     transform.position = initialPosition;
     nextQuestions      = FindObjectOfType <PlayerText>();
     nextQuestions.NextButton();
 }
Example #7
0
 // Start is called before the first frame update
 void Start()
 {
     nextQuestions = FindObjectOfType <PlayerText>();
     perdiste.SetActive(false);
     initialPosition       = transform.position;
     ShowLives.livesAmount = 3;
     ShowScore.scoreValue  = 0;
     animedBar();
     canvasAnimation = GameObject.FindGameObjectWithTag("CanvasShake").GetComponent <AnimScript>();
     livesSprite     = GameObject.FindObjectOfType <LivesSprite>();
 }
Example #8
0
 private void Awake()
 {
     if (playerTextInstance != null && playerTextInstance != this)
     {
         if (gameObject != null)
         {
             Destroy(gameObject);
         }
         return;
     }
     playerTextInstance = this;
 }
Example #9
0
 private void OnCollisionEnter2D(Collision2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         if (workOnce)
         {
             workOnce = false;
             StartCoroutine("InvokeFn");
             pt = FindObjectOfType <PlayerText>();
         }
     }
 }
Example #10
0
 public void OnCollisionStay2D(Collision2D collision)
 {
     text   = collision.gameObject.GetComponent <PlayerText>();
     player = collision.gameObject.GetComponent <PlayerController>();
     if (zpressed == true)
     {
         if (signrun == false)
         {
             StartCoroutine(signmes());
         }
     }
 }
Example #11
0
 // Use this for initialization
 void Awake()
 {
     Playertext = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <PlayerText> ();
     enemy      = GetComponent <EnemyController> ();
     if (enemy.tag == "Ghost")
     {
         maxHP = 5;
     }
     if (enemy.tag == "ShadowDemon")
     {
         maxHP = 7;
     }
     currentHP = maxHP;
 }
Example #12
0
 public void OnCollisionStay2D(Collision2D collision)
 {
     text   = collision.gameObject.GetComponent <PlayerText>();
     player = collision.gameObject.GetComponent <PlayerController>();
     if (zpressed == true)
     {
         if (introlevel == 0 && intro0run == false)
         {
             StartCoroutine(intro0());
         }
         if (introlevel == 1 && intro1run == false)
         {
             StartCoroutine(intro1());
         }
     }
 }
Example #13
0
	// Use this for initialization
	void Start ()
	{
	    rb = GetComponent<Rigidbody2D>();
	    boxCollider = GetComponent<BoxCollider2D>();
        s_anim = GetComponent<Animator>();
	    text = GameObject.Find("Textbox").GetComponent<PlayerText>();
        
    
        s_anim.SetFloat ( 
            "vx",
            0
        );
        s_anim.SetFloat ( 
            "vy",
            -1
        );
	}
Example #14
0
 public void Awake()
 {
     playerText = gameObject.GetComponentInChildren <PlayerText>();
 }
Example #15
0
        public void Read(RakNet.BitStream stream, RakNet.Packet packet, Client client)
        {
            byte type = 0;

            stream.Read(out type);
            GuiMessageType gmT = (GuiMessageType)type;

            int viewID = 0;

            if (gmT == GuiMessageType.Show)
            {
                stream.Read(out viewID);
                View v = getViewFromList(viewID);

                v.show();
            }
            else if (gmT == GuiMessageType.Hide)
            {
                stream.Read(out viewID);
                View v = getViewFromList(viewID);

                v.hide();
            }
            else if (gmT == GuiMessageType.SetPosition)
            {
                Vec2i position;
                stream.Read(out viewID);
                stream.Read(out position);
                View v = getViewFromList(viewID);

                v.setPosition(position);
            }
            else if (gmT == GuiMessageType.Destroy)
            {
                stream.Read(out viewID);
                View v = getViewFromList(viewID);

                v.Destroy();
            }//Creation:
            else if (gmT == GuiMessageType.CreateTexture)
            {
                Vec2i  position, size;
                string texture;
                int    parentID  = 0;
                int    guiEvents = 0;

                stream.Read(out viewID);
                stream.Read(out position);
                stream.Read(out size);
                stream.Read(out texture);
                stream.Read(out parentID);
                stream.Read(out guiEvents);

                Texture tex = new Texture(viewID, texture, position, size, getTextureParentFromList(parentID), (GUIEvents)guiEvents);
                viewList.Add(viewID, tex);
            }
            else if (gmT == GuiMessageType.CreateText)
            {
                Vec2i     position;
                string    text, font;
                ColorRGBA color;
                int       parentID = 0;

                stream.Read(out viewID);
                stream.Read(out position);
                stream.Read(out text);
                stream.Read(out font);
                stream.Read(out color);
                stream.Read(out parentID);

                Text textView = new Text(viewID, text, font, position, getTextureParentFromList(parentID), color);
                viewList.Add(viewID, textView);
            }
            else if (gmT == GuiMessageType.CreateTextBox)
            {
                Vec2i     position;
                string    text, font;
                ColorRGBA color;
                int       parentID = 0, sendKey, startWriteKey, resetKey;

                stream.Read(out viewID);
                stream.Read(out position);
                stream.Read(out text);
                stream.Read(out font);
                stream.Read(out color);
                stream.Read(out sendKey);
                stream.Read(out startWriteKey);
                stream.Read(out resetKey);
                stream.Read(out parentID);

                TextBox textView = new TextBox(viewID, text, font, position, getTextureParentFromList(parentID), color, resetKey, startWriteKey, sendKey);
                viewList.Add(viewID, textView);
            }
            else if (gmT == GuiMessageType.CreateTextArea)
            {
                Vec2i     position, size;
                string    text, font;
                ColorRGBA color;
                int       parentID = 0, sendKey, startWriteKey, resetKey;

                stream.Read(out viewID);
                stream.Read(out position);
                stream.Read(out size);
                stream.Read(out text);
                stream.Read(out font);
                stream.Read(out color);
                stream.Read(out sendKey);
                stream.Read(out startWriteKey);
                stream.Read(out resetKey);
                stream.Read(out parentID);

                TextArea textView = new TextArea(viewID, text, font, position, size, getTextureParentFromList(parentID), color, resetKey, startWriteKey, sendKey);
                viewList.Add(viewID, textView);
            }
            else if (gmT == GuiMessageType.CreateMessageBox)
            {
                Vec2i  position;
                int    parentID = 0;
                String font;
                byte   lines;

                stream.Read(out viewID);
                stream.Read(out position);
                stream.Read(out parentID);
                stream.Read(out font);
                stream.Read(out lines);

                MessageBox messageBox = new MessageBox(viewID, lines, font, position, getTextureParentFromList(parentID));
                viewList.Add(viewID, messageBox);
            }
            else if (gmT == GuiMessageType.CreateCursor)
            {
                Vec2i  position, size;
                string texture;
                int    parentID = 0;

                stream.Read(out viewID);
                stream.Read(out position);
                stream.Read(out size);
                stream.Read(out texture);
                stream.Read(out parentID);



                Cursor tex = new Cursor(viewID, texture, position, size);
                viewList.Add(viewID, tex);
            }
            else if (gmT == GuiMessageType.CreateButton)
            {
                Vec2i     position, size;
                string    texture, text, font;
                int       parentID = 0;
                ColorRGBA color;
                int       guiEvents = 0;

                stream.Read(out viewID);
                stream.Read(out position);
                stream.Read(out size);
                stream.Read(out text);
                stream.Read(out texture);
                stream.Read(out font);
                stream.Read(out color);


                stream.Read(out parentID);
                stream.Read(out guiEvents);


                Button tex = new Button(viewID, text, texture, font, color, position, size, getTextureParentFromList(parentID), (GUIEvents)guiEvents);
                viewList.Add(viewID, tex);
            }
            else if (gmT == GuiMessageType.CreateList)
            {
                Vec2i  position, size;
                string texture, font;
                int    parentID  = 0;
                int    guiEvents = 0;
                byte   lines     = 0;


                stream.Read(out viewID);
                stream.Read(out position);
                stream.Read(out size);
                stream.Read(out texture);
                stream.Read(out parentID);
                //stream.Read(out guiEvents);
                stream.Read(out lines);
                stream.Read(out font);

                GUI.GuiList.List tex = new GUI.GuiList.List(viewID, lines, font, position, size, texture, getTextureParentFromList(parentID), (GUIEvents)guiEvents);
                viewList.Add(viewID, tex);
            }
            else if (gmT == GuiMessageType.CreateListText)
            {
                String    text = "";
                int       parentID = 0;
                ColorRGBA activeColor, inactiveColor;


                stream.Read(out viewID);
                stream.Read(out text);
                stream.Read(out parentID);
                stream.Read(out activeColor);
                stream.Read(out inactiveColor);


                GUI.GuiList.List     list        = getListParentFromList(parentID);
                GUI.GuiList.ListText listelement = new GUI.GuiList.ListText(viewID, text, list, activeColor, inactiveColor);
                list.addRow(listelement);
                viewList.Add(viewID, listelement);
            }
            else if (gmT == GuiMessageType.CreateListButton)
            {
                String    text = "";
                int       parentID = 0;
                ColorRGBA activeColor, inactiveColor;

                stream.Read(out viewID);
                stream.Read(out text);
                stream.Read(out parentID);

                stream.Read(out activeColor);
                stream.Read(out inactiveColor);


                GUI.GuiList.List       list        = getListParentFromList(parentID);
                GUI.GuiList.ListButton listelement = new GUI.GuiList.ListButton(viewID, text, list, activeColor, inactiveColor);
                list.addRow(listelement);
                viewList.Add(viewID, listelement);
            }
            else if (gmT == GuiMessageType.CreateListTextBox)
            {
                String    text = "";
                String    hardText = "";
                int       parentID = 0;
                ColorRGBA activeColor, inactiveColor;


                stream.Read(out viewID);

                stream.Read(out hardText);
                stream.Read(out text);

                stream.Read(out parentID);

                stream.Read(out activeColor);
                stream.Read(out inactiveColor);


                GUI.GuiList.List        list        = getListParentFromList(parentID);
                GUI.GuiList.ListTextBox listelement = new GUI.GuiList.ListTextBox(viewID, hardText, text, list, activeColor, inactiveColor);
                list.addRow(listelement);
                viewList.Add(viewID, listelement);
            }
            else if (gmT == GuiMessageType.CreateText3D)
            {
                Vec3f  position;
                float  maxDistance;
                int    parentID = 0;
                String world    = "";

                stream.Read(out viewID);
                stream.Read(out position);
                stream.Read(out world);
                stream.Read(out maxDistance);
                stream.Read(out parentID);

                int rowCount = 0;
                stream.Read(out rowCount);

                Text3D textView = new Text3D(viewID, world, maxDistance, position);
                for (int i = 0; i < rowCount; i++)
                {
                    String    text = "";
                    ColorRGBA color = ColorRGBA.White;
                    long      time = 0, blendTime;

                    stream.Read(out text);
                    stream.Read(out color);
                    stream.Read(out time);
                    stream.Read(out blendTime);

                    textView.addRow(new Text3D.Text3DRow()
                    {
                        Text = text, Color = color, Time = time, BlendTime = blendTime
                    });
                }


                viewList.Add(viewID, textView);
            }
            else if (gmT == GuiMessageType.CreateTextPlayer)
            {
                int   playerID = 0;
                float maxDistance;
                int   parentID = 0;


                stream.Read(out viewID);
                stream.Read(out playerID);
                stream.Read(out maxDistance);
                stream.Read(out parentID);

                int rowCount = 0;
                stream.Read(out rowCount);

                Vob vob = null;
                if (!sWorld.VobDict.TryGetValue(playerID, out vob))
                {
                    throw new Exception("Player id:" + playerID + " was not found!");
                }
                if (!(vob is Player))
                {
                    throw new Exception("Vob is not a Player: " + playerID + " " + vob);
                }

                PlayerText textView = new PlayerText(viewID, (Player)vob, maxDistance);
                for (int i = 0; i < rowCount; i++)
                {
                    String    text = "";
                    ColorRGBA color = ColorRGBA.White;
                    long      time = 0, blendTime;

                    stream.Read(out text);
                    stream.Read(out color);
                    stream.Read(out time);
                    stream.Read(out blendTime);

                    textView.addRow(new Text3D.Text3DRow()
                    {
                        Text = text, Color = color, Time = time, BlendTime = blendTime
                    });
                }


                viewList.Add(viewID, textView);
            }
            else if (gmT == GuiMessageType.Text3DAddRow)
            {
                String    text = "";
                ColorRGBA color = ColorRGBA.White;
                long      time = 0, blendTime = 0;

                stream.Read(out viewID);
                stream.Read(out text);
                stream.Read(out color);
                stream.Read(out time);
                stream.Read(out blendTime);

                View v = getViewFromList(viewID);

                if (!(v is Text3D))
                {
                    throw new Exception("Text3DAddRow works only with a Text3D!: " + v);
                }

                Text3D t3d = (Text3D)v;
                t3d.addRow(new Text3D.Text3DRow()
                {
                    Text = text, Color = color, Time = time, BlendTime = blendTime
                });
            }
            else if (gmT == GuiMessageType.Text3DClear)
            {
                stream.Read(out viewID);
                View v = getViewFromList(viewID);

                if (!(v is Text3D))
                {
                    throw new Exception("Text3DAddRow works only with a Text3D!: " + v);
                }

                Text3D t3d = (Text3D)v;
                t3d.Clear();
            }
            else if (gmT == GuiMessageType.Text3DPosition)
            {
                Vec3f position = new Vec3f();
                stream.Read(out viewID);
                stream.Read(out position);
                View v = getViewFromList(viewID);

                if (!(v is Text3D))
                {
                    throw new Exception("Text3DAddRow works only with a Text3D!: " + v);
                }

                Text3D t3d = (Text3D)v;
                t3d.setPosition(position);
            }
            //Texture:
            else if (gmT == GuiMessageType.SetTexture)
            {
                String texture = "";

                stream.Read(out viewID);
                stream.Read(out texture);
                View v = getViewFromList(viewID);

                if (!(v is Texture) && !(v is Button))
                {
                    throw new Exception("SetTexture works only with a texture or buttons!: " + v);
                }
                Texture tex = (Texture)v;
                tex.setTexture(texture);
            }
            else if (gmT == GuiMessageType.SetSize)
            {
                Vec2i position;

                stream.Read(out viewID);
                stream.Read(out position);
                View v = getViewFromList(viewID);

                if (!(v is Texture) && !(v is Button))
                {
                    throw new Exception("SetSize works only with a texture or buttons!: " + v);
                }
                Texture tex = (Texture)v;
                tex.setSize(position);
            }//Text&TextBox:
            else if (gmT == GuiMessageType.SetText)
            {
                String text = "";

                stream.Read(out viewID);
                stream.Read(out text);
                View v = getViewFromList(viewID);

                if (!(v is Text) && !(v is TextBox) && !(v is TextArea) && !(v is Button))
                {
                    throw new Exception("SetText works only with a text and textbox!: " + v);
                }

                if (v is Text)
                {
                    Text tex = (Text)v;
                    tex.setText(text);
                }
                else if (v is TextBox)
                {
                    TextBox tex = (TextBox)v;
                    tex.setText(text);
                }
                else if (v is TextArea)
                {
                    TextArea tex = (TextArea)v;
                    tex.setText(text);
                }
                else if (v is Button)
                {
                    Button button = (Button)v;
                    button.setText(text);
                }
            }
            else if (gmT == GuiMessageType.SetTextFont)
            {
                String font = "";

                stream.Read(out viewID);
                stream.Read(out font);
                View v = getViewFromList(viewID);

                if (!(v is Text) && !(v is TextBox))
                {
                    throw new Exception("SetFont works only with a text and textbox!: " + v);
                }

                if (v is Text)
                {
                    Text tex = (Text)v;
                    tex.setFont(font);
                }
                else if (v is TextBox)
                {
                    TextBox tex = (TextBox)v;
                    tex.setFont(font);
                }
            }
            else if (gmT == GuiMessageType.SetTextColor)
            {
                ColorRGBA color;

                stream.Read(out viewID);
                stream.Read(out color);
                View v = getViewFromList(viewID);

                if (!(v is Text) && !(v is TextBox) && !(v is TextArea))
                {
                    throw new Exception("SetColor works only with a text and textbox!: " + v);
                }

                if (v is Text)
                {
                    Text tex = (Text)v;
                    tex.setColor(color);
                }
                else if (v is TextBox)
                {
                    TextBox tex = (TextBox)v;
                    tex.setColor(color);
                }
                else if (v is TextArea)
                {
                    TextArea tex = (TextArea)v;
                    tex.setColor(color);
                }
            }//TextBox!
            else if (gmT == GuiMessageType.TextBoxStartWriting)
            {
                stream.Read(out viewID);
                View v = getViewFromList(viewID);

                if (!(v is TextBox) && !(v is TextArea))
                {
                    throw new Exception("TextBoxStartWriting works only with a textbox!: " + v);
                }

                if (v is TextBox)
                {
                    TextBox tex = (TextBox)v;
                    tex.startWriting();
                }
                else if (v is TextArea)
                {
                    TextArea tex = (TextArea)v;
                    tex.startWriting();
                }
            }
            else if (gmT == GuiMessageType.TextBoxStopWriting)
            {
                stream.Read(out viewID);
                View v = getViewFromList(viewID);

                if (!(v is TextBox) && !(v is TextArea))
                {
                    throw new Exception("TextBoxStartWriting works only with a textbox!: " + v);
                }

                if (v is TextBox)
                {
                    TextBox tex = (TextBox)v;
                    tex.stopWriting();
                }
                else if (v is TextArea)
                {
                    TextArea tex = (TextArea)v;
                    tex.stopWriting();
                }
            }
            else if (gmT == GuiMessageType.TextBoxCallSend)
            {
                stream.Read(out viewID);
                View v = getViewFromList(viewID);

                if (!(v is TextBox) && !(v is TextArea))
                {
                    throw new Exception("TextBoxStartWriting works only with a textbox!: " + v);
                }

                if (v is TextBox)
                {
                    TextBox tex = (TextBox)v;
                    tex.callSendText();
                }
                else if (v is TextArea)
                {
                    TextArea tex = (TextArea)v;
                    tex.callSendText();
                }
            }
            else if (gmT == GuiMessageType.TextBoxSetStartWritingKey)
            {
                int key = 0;
                stream.Read(out viewID);
                stream.Read(out key);
                View v = getViewFromList(viewID);

                if (!(v is TextBox) && !(v is TextArea))
                {
                    throw new Exception("TextBoxStartWriting works only with a textbox!: " + v);
                }

                if (v is TextBox)
                {
                    TextBox tex = (TextBox)v;
                    tex.setEnableKey(key);
                }
                else if (v is TextArea)
                {
                    TextArea tex = (TextArea)v;
                    tex.setEnableKey(key);
                }
            }
            else if (gmT == GuiMessageType.TextBoxSetSendKey)
            {
                int key = 0;
                stream.Read(out viewID);
                stream.Read(out key);
                View v = getViewFromList(viewID);

                if (!(v is TextBox) && !(v is TextArea))
                {
                    throw new Exception("TextBoxStartWriting works only with a textbox!: " + v);
                }

                if (v is TextBox)
                {
                    TextBox tex = (TextBox)v;
                    tex.setSendKey(key);
                }
                else if (v is TextArea)
                {
                    TextArea tex = (TextArea)v;
                    tex.setSendKey(key);
                }
            }
            else if (gmT == GuiMessageType.TextBoxSetResetKey)
            {
                int key = 0;
                stream.Read(out viewID);
                stream.Read(out key);
                View v = getViewFromList(viewID);

                if (!(v is TextBox) && !(v is TextArea))
                {
                    throw new Exception("TextBoxStartWriting works only with a textbox!: " + v);
                }


                if (v is TextBox)
                {
                    TextBox tex = (TextBox)v;
                    tex.setResetKey(key);
                }
                else if (v is TextArea)
                {
                    TextArea tex = (TextArea)v;
                    tex.setResetKey(key);
                }
            }//MessageBox:
            else if (gmT == GuiMessageType.MessageBoxAddLine)
            {
                String    message;
                ColorRGBA color;
                stream.Read(out viewID);
                stream.Read(out color);
                stream.Read(out message);
                View v = getViewFromList(viewID);

                if (!(v is MessageBox))
                {
                    throw new Exception("TextBoxStartWriting works only with a textbox!: " + v);
                }

                MessageBox tex = (MessageBox)v;
                tex.addMessage(message, color);
            }
        }
Example #16
0
    public override void OnAwake()
    {
        Instance = this;
        cam      = gameObject.GetComponent <Camera>();
        Canvas   = cam.AddCanvas();

        //Scoreboard Image
        Scoreboard          = Canvas.Add(ScoreBG);
        Scoreboard.color    = Color.White;
        Scoreboard.origin   = new Vector2(0.5f);
        Scoreboard.position = new Vector2(0.5f, 0.11f);
        Scoreboard.depth    = 0.9f;
        Scoreboard.scale    = Scale;

        //Team1BG Image
        Team1Bar          = Canvas.Add(TeamBG);
        Team1Bar.color    = Team1.Color;
        Team1Bar.origin   = new Vector2(1, 0.5f);
        Team1Bar.position = Scoreboard.position + new Vector2(-Scoreboard.size.x * 0.5f, 0);
        Team1Bar.depth    = 1;
        Team1Bar.flip     = new Vector2(0, 1);
        Team1Bar.scale    = Scale;

        //Team2BG Image
        Team2Bar          = Canvas.Add(TeamBG);
        Team2Bar.color    = Team2.Color;
        Team2Bar.origin   = new Vector2(0, 0.5f);
        Team2Bar.position = Scoreboard.position + new Vector2(Scoreboard.size.x * 0.5f, 0);
        Team2Bar.depth    = 1;
        Team2Bar.scale    = Scale;

        //Team1 Score
        Score[0]          = Canvas.Add(Team1.Score.ToString());
        Score[0].color    = Color.Black;
        Score[0].origin   = new Vector2(0.5f);
        Score[0].position = Scoreboard.position + new Vector2(-Scoreboard.size.x * 0.27f, Scoreboard.size.y * 0.09f);
        Score[0].scale    = Scale;

        //Team2 Score
        Score[1]          = Canvas.Add(Team2.Score.ToString());
        Score[1].color    = Color.Black;
        Score[1].origin   = new Vector2(0.5f);
        Score[1].position = Scoreboard.position + new Vector2(Scoreboard.size.x * 0.25f, Scoreboard.size.y * 0.09f);
        Score[1].scale    = Scale;

        //Score text
        ScoreHeader          = Canvas.Add("Score");
        ScoreHeader.color    = Color.Black;
        ScoreHeader.origin   = new Vector2(0.5f);
        ScoreHeader.scale    = new Vector2(0.5f) * Scale;
        ScoreHeader.position = Scoreboard.position + new Vector2(0, -Scoreboard.size.y * 0.2875f);

        //Team1 name
        TeamName[0]          = Canvas.Add(Team1.Name);
        TeamName[0].origin   = new Vector2(0, 0.5f);
        TeamName[0].color    = Color.FloralWhite;
        TeamName[0].scale    = new Vector2(0.5f) * Scale;
        TeamName[0].position = Team1Bar.position - new Vector2(Team1Bar.size.x * 0.5f, 0);

        //Team2 name
        TeamName[1]          = Canvas.Add(Team2.Name);
        TeamName[1].origin   = new Vector2(1, 0.5f);
        TeamName[1].color    = Color.FloralWhite;
        TeamName[1].scale    = new Vector2(0.5f) * Scale;
        TeamName[1].position = Team2Bar.position + new Vector2(Team2Bar.size.x * 0.5f, 0);

        //Add one row for every player. They are then only drawn based on players in each team.
        for (int i = 0; i < MatchSystem.instance.MaxPlayers / 2; i++)
        {
            PlayerStandardBarTeam1.Add(Canvas.Add(PlayerBG));
            PlayerStandardBarTeam1[i].color     = Team1.Color;
            PlayerStandardBarTeam1[i].origin    = new Vector2(1, 0.5f);
            PlayerStandardBarTeam1[i].position  = new Vector2(0.5f, 0.32f + (i * 0.063f));
            PlayerStandardBarTeam1[i].depth     = 1;
            PlayerStandardBarTeam1[i].rendering = false;
            PlayerStandardBarTeam1[i].scale     = Scale;
            Team1Players.Add(new PlayerText(Canvas, TEAM_TYPE.TEAM_1, PlayerStandardBarTeam1[i]));

            PlayerStandardBarTeam2.Add(Canvas.Add(PlayerBG));
            PlayerStandardBarTeam2[i].color     = Team2.Color;
            PlayerStandardBarTeam2[i].origin    = new Vector2(0, 0.5f);
            PlayerStandardBarTeam2[i].position  = new Vector2(0.5f, 0.32f + (i * 0.063f));
            PlayerStandardBarTeam2[i].flip      = new Vector2(0, 1);
            PlayerStandardBarTeam2[i].depth     = 1;
            PlayerStandardBarTeam2[i].rendering = false;
            PlayerStandardBarTeam2[i].scale     = Scale;
            Team2Players.Add(new PlayerText(Canvas, TEAM_TYPE.TEAM_2, PlayerStandardBarTeam2[i]));
        }

        //Header background above Team1 players
        PlayerHeaderBackground[0]          = Canvas.Add(PlayerBG);
        PlayerHeaderBackground[0].position = new Vector2(0.5f, 0.32f + (-1 * 0.063f));
        PlayerHeaderBackground[0].color    = Team1.Color;
        PlayerHeaderBackground[0].origin   = new Vector2(1, 0.5f);
        PlayerHeaderBackground[0].depth    = 1;
        PlayerHeaderBackground[0].scale    = Scale;

        //Header background above Team2 players
        PlayerHeaderBackground[1]          = Canvas.Add(PlayerBG);
        PlayerHeaderBackground[1].position = new Vector2(0.5f, 0.32f + (-1 * 0.063f));
        PlayerHeaderBackground[1].color    = Team2.Color;
        PlayerHeaderBackground[1].origin   = new Vector2(0, 0.5f);
        PlayerHeaderBackground[1].flip     = new Vector2(0, 1);
        PlayerHeaderBackground[1].depth    = 1;
        PlayerHeaderBackground[1].scale    = Scale;

        //Header text above Team1 players
        PlayerHeader[0]              = new PlayerText(Canvas, TEAM_TYPE.TEAM_1, PlayerHeaderBackground[0]);
        PlayerHeader[0].Name.text    = "Name";
        PlayerHeader[0].Goals.text   = "Goals";
        PlayerHeader[0].Tackles.text = "Tackles";
        PlayerHeader[0].Score.text   = "Score";
        PlayerHeader[0].Ping.text    = "Ping";
        PlayerHeader[0].Scale        = new Vector2(0.33f) * Scale;
        PlayerHeader[0].IsRendering  = true;

        //Header text above Team2 players
        PlayerHeader[1]              = new PlayerText(Canvas, TEAM_TYPE.TEAM_2, PlayerHeaderBackground[1]);
        PlayerHeader[1].Name.text    = "Name";
        PlayerHeader[1].Goals.text   = "Goals";
        PlayerHeader[1].Tackles.text = "Tackles";
        PlayerHeader[1].Score.text   = "Score";
        PlayerHeader[1].Ping.text    = "Ping";
        PlayerHeader[1].Scale        = new Vector2(0.33f) * Scale;
        PlayerHeader[1].IsRendering  = true;
    }