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;
        }
    }
Example #2
0
    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;
    }