/// <summary>
 /// On Awake, make sure that all properties have been set up properly.
 /// </summary>
 void Awake()
 {
     if (fpFreezePlayer == null)
     {
         Debug.LogError("You must assign FPFreezePlayer to " + name);
         enabled = false;
     }
     if (fpInventory == null)
     {
         Debug.LogError("You must assign vp_Inventory to " + name);
         enabled = false;
     }
     guiRoot = GetComponentInChildren <GUIRoot>();
     if (guiRoot == null)
     {
         Debug.LogError("No GUIRoot found under " + name);
         enabled = false;
     }
     else
     {
         guiRoot.gameObject.SetActive(false);
     }
     if (weaponPanels.Length <= 0)
     {
         Debug.LogError("You must assign at least one weapon panel to " + name);
         enabled = false;
     }
 }
 void Awake()
 {
     GUIRoot.instance = this;
 }
Exemple #3
0
    /// <summary>
    /// Helper function that figures out the pixel size adjustment for the specified game object.
    /// </summary>

    static public float GetPixelSizeAdjustment(GameObject go)
    {
        GUIRoot root = NJGTools.FindInParents <GUIRoot>(go);

        return((root != null) ? root.pixelSizeAdjustment : 1f);
    }
Exemple #4
0
 void Awake()
 {
     __instance = this;
 }
Exemple #5
0
 void Awake()
 {
     guiRoot = GetComponent <GUIRoot>();
 }
Exemple #6
0
 internal void SetGuiRoot(GUIRoot gUIRoot)
 {
     this._guiroot = gUIRoot;
 }
Exemple #7
0
 void Awake()
 {
     __instance = this;
 }
Exemple #8
0
 internal void SetDependencies(GUIRoot gUIRoot)
 {
     this.guiRoot = gUIRoot;
 }