示例#1
0
 void Awake()
 {
     _timeSinceLastShot = 0f;
     _IsShieldUp        = false;
     _score             = 0;
     _checkForEnemy     = CheckForEnemy.Instance;
     _effectsManager    = EffectsManager.Instance;
 }
示例#2
0
 private void Awake()
 {
     _reticleTransform = reticle.GetComponent <Transform>();
     _originalScale    = _reticleTransform.localScale;
     _originalRotation = _reticleTransform.localRotation;
     _reticleRend      = reticle.GetComponent <Renderer>();
     _defaultColor     = _reticleRend.material.color;
     _raycastManager   = RaycastManager.Instance;
     _checkForEnemy    = CheckForEnemy.Instance;
 }
示例#3
0
 public virtual void Start()
 {
     canvas           = GetComponentInChildren <Canvas>();
     checkForEnemyRef = GetComponentInChildren <CheckForEnemy>();
     if (canvas != null)
     {
         healthBar  = canvas.GetComponent <RectTransform>();
         healthFill = canvas.GetComponentInChildren <Slider>();
     }
 }