Beispiel #1
0
    // private GameObject m_CanvasGameObject;

    public void Setup()
    {
        m_movement   = m_instance.GetComponent <TankBoardMovement>();
        m_fire       = m_instance.GetComponent <TankFire>();
        m_tankDamage = m_instance.GetComponent <TankDamageOverlay>();
        m_tankDamage.setFollowTarget(m_instance.transform);
        // m_CanvasGameObject = m_instance.GetComponentInChildren<Canvas>().gameObject;
        m_movement.wait = true;
        m_fire.wait     = true;
        // m_coloredPlayerText = "<color=#" + ColorUtility.ToHtmlStringRGB(m_PlayerColor) + ">PLAYER " + m_playerNumber + "</color>";
        MeshRenderer[] renderers = m_instance.GetComponentsInChildren <MeshRenderer>();

        for (int i = 0; i < renderers.Length; i++)
        {
            renderers[i].material.color = m_PlayerColor;
        }

        wait();
    }
Beispiel #2
0
 private void Start()
 {
     tankDamageUI = GetComponent <TankDamageOverlay>();
 }