Ejemplo n.º 1
0
    void Start()
    {
        theStatus     = GetComponent <PlayerStatus>();
        theGravity    = GetComponent <Gravity>();
        theCrosshair  = GetComponent <HUDCrosshair>();
        theController = GetComponent <CharacterController>();
        cam           = Camera.main;

        currentAngleY = transform.localEulerAngles.x;
        currentAngleX = cam.transform.localEulerAngles.y;
    }
Ejemplo n.º 2
0
    public void Awake()
    {
        _canvas    = GetComponent <Canvas>();
        _crosshair = GetComponentInChildren <HUDCrosshair>();
        _healthBar = GetComponentInChildren <HealthBar>();

        _healthState = GetComponentInParent <HealthState>();
        _healthState.onDamage.AddListener(UpdateHealthBar);
        _healthState.onLastDamageChanged.AddListener(UpdateCrosshair);
        _healthState.onDamageUpdate.AddListener(UpdateDamageIndicator);
    }
Ejemplo n.º 3
0
 private void Awake()
 {
     theCrosshair = FindObjectOfType <HUDCrosshair>();
     myAnim       = GetComponentInChildren <Animator>();
     StartCoroutine(ActiveWeapon(goCurrentWeapon));
 }
Ejemplo n.º 4
0
 protected void Awake()
 {
     theWeaponManager = FindObjectOfType <WeaponManager>();
     theCrosshair     = FindObjectOfType <HUDCrosshair>();
     cam = Camera.main;
 }