Exemplo n.º 1
0
        // 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;
        }
Exemplo n.º 2
0
 public void SetupUIBar()
 {
     uiBars = GetComponentInChildren <UIBars>();
     uiBars.SetMaxValue(vidaMax);
 }
Exemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     Instance = this;
 }
Exemplo n.º 4
0
 private void Awake()
 {
     healthBar = GetComponentInChildren <UIBars>();
 }