Esempio n. 1
0
    // Use this for initialization
    void OnEnable()
    {
        fireAmmunition = gameObject.GetComponentInChildren<FireAmmunition>();

        if (null != fireAmmunition)
        {
            InvokeRepeating("shoot", 3, 2);
        }
    }
Esempio n. 2
0
    void Start()
    {
        fireAmmunition = GameObject.Find(NameContainer.PLAYER).gameObject.GetComponentInChildren <FireAmmunition>();

        GameObject _fireForceBar = GameObject.Find(NameContainer.FIRE_FORCE_BAR);

        if (null != _fireForceBar)
        {
            fireForceBar = _fireForceBar.GetComponent <InfoBar>();
        }
    }
Esempio n. 3
0
 void Awake()
 {
     player          = gameObject.GetComponent <Player> ();
     playerMovement  = gameObject.GetComponentInChildren <PlayerMovement> ();
     fireAmmunition  = gameObject.GetComponentInChildren <FireAmmunition> ();
     animator        = GetComponent <Animator>();
     _particleSystem = GetComponent <ParticleSystem> ();
     if (null != _particleSystem)
     {
         _particleSystem.Stop();
     }
 }