private void Awake()
    {
        _followerScript = Camera.mainCamera.GetComponent< FollowerCrowdScript >();

        _backgroundTexture = new Texture2D( 1, 1 );
        _backgroundTexture.SetPixel( 1, 1, Color.black );
        _backgroundTexture.Apply();

        var scale = ((Screen.width > Screen.height) ? Screen.height : Screen.width) * 0.001f;
        _guiMatrix = Matrix4x4.TRS(
            new Vector3((Screen.width * .5f) - ((800 * .5f) * scale),   //  760 is the fixed width of the yellow text box
                         (Screen.height * .5f) - ((820 * .5f) * scale), 0), //  820 has no specific meaning but it's high enough to let it stretch down.
            Quaternion.identity, new Vector3(scale, scale, 1));
    }
Exemple #2
0
 private void Awake()
 {
     _followerCrowdScript = Camera.mainCamera.GetComponent< FollowerCrowdScript >();
 }
Exemple #3
0
 protected void Start()
 {
     _crowdScript = GameObject.FindWithTag("MainCamera").GetComponent<FollowerCrowdScript>();
 }
Exemple #4
0
 protected virtual void Awake()
 {
     _crowdScript = GameObject.FindWithTag("MainCamera").GetComponent<FollowerCrowdScript>();
 }