// Use this for initialization private void Start() { m_CharacterController = GetComponent <CharacterController>(); m_Camera = Camera.main; m_OriginalCameraPosition = m_Camera.transform.localPosition; m_FovKick.Setup(m_Camera); m_HeadBob.Setup(m_Camera, m_StepInterval); m_StepCycle = 0f; m_NextStep = m_StepCycle / 2f; m_Jumping = false; //m_AudioSource = GetComponent<AudioSource>(); m_MouseLook.Init(transform, m_Camera.transform); health = (Health)GetComponent(typeof(Health)); bars = (UIBars)GetComponent(typeof(UIBars)); //Balance Sliders m_DashMultiplier = 20; m_MaxEnergy = 100; m_Energy = m_MaxEnergy; m_EnergyDrainMultiplier = 1650; m_EnergyRegenMultiplier = 100; GameManager.Instance.player = gameObject; handAnimator = Hand.GetComponent <Animator> (); characterController = gameObject.GetComponent <CharacterController>(); energyBarColor = UIManager.instance.energyBarImage.color; }
public void SetupUIBar() { uiBars = GetComponentInChildren <UIBars>(); uiBars.SetMaxValue(vidaMax); }
// Start is called before the first frame update void Start() { Instance = this; }
private void Awake() { healthBar = GetComponentInChildren <UIBars>(); }