Ejemplo n.º 1
0
 protected virtual void Start()
 {
     sh   = transform.root.GetComponentInChildren <StealthHider>();
     cs   = GetComponentInParent <ControlSource>();
     move = transform.parent.GetComponentInChildren <Movement>();
     SelectFiringSound();
     energy = GetComponent <Energy>();
 }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     ut                  = FindObjectOfType <UnitTracker>();
     ownIFF              = GetComponentInChildren <IFF>();
     attackRange         = weaponLifetime * weaponSpeed;
     selectedFiringSound = SelectSoundFromArray(firingSounds);
     sh                  = GetComponentInChildren <StealthHider>();
 }
Ejemplo n.º 3
0
 // Start is called before the first frame update
 public override void OnStartServer()
 {
     base.OnStartServer();
     ut                      = FindObjectOfType <UnitTracker>();
     ownIFF                  = GetComponent <IFF>();
     attackRange             = weaponLifetime * weaponSpeed;
     sh                      = GetComponentInChildren <StealthHider>();
     ss                      = GetComponentInChildren <StealthSeeker>();
     ss.OnSeekerDetection   += EvaluateDetectedObject;
     ss.OnSeekerLostContact += HandleLostContact;
     ut.AddUnitToTargetableList(gameObject);
     ownIFF.OnChangeIFF += CheckForAlliesAsTargetsAfterIFFChange;
 }
Ejemplo n.º 4
0
 protected override void Start()
 {
     base.Start();
     weaponSource = GetComponentInChildren <WeaponSource>().transform;
     sh           = GetComponentInChildren <StealthHider>();
 }