void Start() { egb = GetComponent <EquippedGunBehaviour>(); centerPoint = new Vector3(Screen.width / 2, Screen.height / 2, -5f); cam = Camera.main; CreateCentrePoint(centerPoint); sinAngle = Mathf.Sin(30 * Mathf.PI / 180); cosAngle = Mathf.Cos(30 * Mathf.PI / 180); sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere); sphere2 = GameObject.CreatePrimitive(PrimitiveType.Sphere); sphere3 = GameObject.CreatePrimitive(PrimitiveType.Sphere); sphere4 = GameObject.CreatePrimitive(PrimitiveType.Sphere); //radius = Mathf.Lerp(minRadius,maxRadius,currentAcc/curretGun.MaxAcc) }
public void Start() { currentGun = allGuns[currentGunIndex]; egb = egb.GetComponent <EquippedGunBehaviour>(); egb.OnChange(allGuns[currentGunIndex]); }