Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        this.grabComponent       = GetComponent <SVGrabbable> ();
        this.fireBulletComponent = GetComponent <SVFireBullet> ();
        this.input = this.gameObject.GetComponent <SVControllerInput> ();

        linearAccelerationTracker      = new SVLinearAcceleration();
        revolvingBarrel.revolverParent = this;

        this.SetupComponents();
    }
Esempio n. 2
0
    void OnValidate()
    {
        if (this.grabComponent == null)
        {
            this.grabComponent = GetComponent <SVGrabbable> ();
        }

        if (this.fireBulletComponent == null)
        {
            this.fireBulletComponent = GetComponent <SVFireBullet> ();
        }

        SetupComponents();
    }