// Use this for initialization
    void Start()
    {
        curTransform            = transform;
        photonView              = GetComponent <PhotonView>();
        rifleParticleController = GetComponentInChildren <RifleParticleController>();

        if (rifleParticleController != null)
        {
            rifleParticleController.SetOwner(owner.collider);
        }
    }
    // Use this for initialization
    void Start()
    {
        curTransform = transform;
        photonView = GetComponent<PhotonView>();
        rifleParticleController = GetComponentInChildren<RifleParticleController>();

        if (rifleParticleController != null) {
            rifleParticleController.SetOwner (owner.collider);
        }
    }
Esempio n. 3
0
    // Use this for initialization
    protected void Start()
    {
        aSource = GetComponent<AudioSource> ();
        sControl = new soundControl (aSource);//создаем обьект контроллера звука

        //проверяем длительности звуков стрельбы и перезарядки
        if (fireSound!=null&&fireSound.length >= fireInterval) {
            //Debug.LogWarning("fireSound clip length is greater than fireIntrval value");
        }
        if (reloadSound!=null&&reloadSound.length >= reloadTime) {
            //Debug.LogError("reloadSound clip length is greater than reloadTime value");
        }

        curTransform = transform;
        photonView = GetComponent<PhotonView>();
        rifleParticleController = GetComponentInChildren<RifleParticleController>();

        if (rifleParticleController != null) {
            rifleParticleController.SetOwner (owner.collider);
        }
    }