public void Awake()
    {
        if (AS_SniperKit.Environment != null)
        {
            WindSpeed = AS_SniperKit.Environment.WindSpeed;
        }

        rigidBodyComp   = GetComponent <Rigidbody>();
        targetLocked    = null;
        initialPosition = this.gameObject.transform.position;
        AS_ActionCamera actioncam = (AS_ActionCamera)GameObject.FindObjectOfType(typeof(AS_ActionCamera));

        if (actioncam != null)
        {
            actionPreset = actioncam.GetPresets();
            if (actionPreset != null)
            {
                actionPreset.Shoot(this.gameObject);
            }
        }
        if (this.GetComponent <Renderer>())
        {
            this.GetComponent <Renderer>().enabled = true;
        }
    }
Exemple #2
0
    public void Awake()
    {
        targetLocked = null;
        initialPosition = this.gameObject.transform.position;
        AS_ActionCamera actioncam = (AS_ActionCamera)GameObject.FindObjectOfType (typeof(AS_ActionCamera));

        if (actioncam != null) {
            actionPreset = actioncam.GetPresets ();
            if (actionPreset != null) {
                actionPreset.Shoot (this.gameObject);
            }
        }
        if(this.GetComponent<Renderer>())
            this.GetComponent<Renderer>().enabled = true;
    }
    public void Awake()
    {
        initialPosition = this.gameObject.transform.position;
        AS_ActionCamera actioncam = (AS_ActionCamera)GameObject.FindObjectOfType(typeof(AS_ActionCamera));

        if (actioncam != null)
        {
            actionPreset = actioncam.GetPresets();
            if (actionPreset != null)
            {
                actionPreset.Shoot(this.gameObject);
            }
        }
        this.GetComponent <Renderer>().enabled = true;
    }
Exemple #4
0
    public void Awake()
    {
        if (AS_SniperKit.Environment != null)
        {
            WindSpeed = AS_SniperKit.Environment.WindSpeed;
        }

        if (AS_SniperKit.ActionCam != null)
        {
            actionPreset = AS_SniperKit.ActionCam.GetPresets();
            if (actionPreset != null)
            {
                actionPreset.Shoot(this.gameObject);
            }
        }
    }