Esempio n. 1
0
    /// <summary>
    ///
    /// </summary>
    protected virtual void Awake()
    {
        m_Audio = GetComponent <AudioSource>();

        // store the first player event handler found in the top of our transform hierarchy
        m_Player = (vp_FPPlayerEventHandler)transform.root.GetComponentInChildren(typeof(vp_FPPlayerEventHandler));

        // TEMP: store reference to a possible 'vp_SimpleInventory' in case
        // game uses the old inventory system
        m_SimpleInventory = (vp_SimpleInventory)transform.root.GetComponent(typeof(vp_SimpleInventory));
    }
	/// <summary>
	/// 
	/// </summary>
	protected virtual void Awake()
	{

		m_Audio = audio;

		// store the first player event handler found in the top of our transform hierarchy
		m_Player = (vp_FPPlayerEventHandler)transform.root.GetComponentInChildren(typeof(vp_FPPlayerEventHandler));

		// TEMP: store reference to a possible 'vp_SimpleInventory' in case
		// game uses the old inventory system
		m_SimpleInventory = (vp_SimpleInventory)transform.root.GetComponent(typeof(vp_SimpleInventory));


	}
Esempio n. 3
0
    /// <summary>
    ///
    /// </summary>
    protected virtual void Awake()
    {
        m_PlayerEventHandler = transform.root.GetComponentInChildren <vp_FPPlayerEventHandler>();
        m_Inventory          = transform.root.GetComponentInChildren <vp_SimpleInventory>();

        if (AmmoLabel != null)
        {
            m_AmmoLabel = AmmoLabel.GetComponentInChildren <TextMesh>();
        }
        if (HealthLabel != null)
        {
            m_HealthLabel = HealthLabel.GetComponentInChildren <TextMesh>();
        }
        if (HintsLabel != null)
        {
            m_HintsLabel = HintsLabel.GetComponentInChildren <TextMesh>();
        }

        if (m_HintsLabel != null)
        {
            m_HintsLabel.text = "";
            m_HintsLabel.GetComponent <Renderer>().material.color = Color.clear;
        }
    }
Esempio n. 4
0
    /// <summary>
    ///
    /// </summary>
    protected override void Awake()
    {
        base.Awake();

        m_Inventory = Manager.Player.GetComponent <vp_SimpleInventory>();
    }