// Start is called before the first frame update
    void Start()
    {
        myRotation = GetComponent <Transform>();

        //Initialize Game Object
        //Initialize Component
        gunHead       = parent.transform.GetChild(0).gameObject;
        gunHeadConfig = gunHead.GetComponent <GunHeadConfig>();

        numOfLeftRot  = angleValueForLeftRot.Count;
        numOfRightRot = angleValueForRightRot.Count;

        totalNumRot      = numOfLeftRot + numOfRightRot;
        timeBetRotCycles = Random.Range(minTimeBetRot, maxTimeBetRot);

        // Debug.Log("Total Number of Rotations is " + (totalNumRot));
        // Debug.Log("Current angle value is " + currentAngleValue);
        // Debug.Log(playRotate);

        shotCounter = Random.Range(minTimeBetweenShots, maxTimeBetweenShots);
    }
Example #2
0
    //[SerializeField] GameObject gunHead;

    // Start is called before the first frame update
    void Start()
    {
        myTransform   = GetComponent <Transform>();
        gunHeadConfig = GetComponent <GunHeadConfig>();
    }