void Awake() { playerModel = GetComponent <PlayerModel>(); QTEBuffer = maxQTEBuffer.GetRandom(); maxQTETimer = QTETimer; }
public override Vector3 GetPosition() { if (useMinMaxRadius) { return(transform.TransformPoint(Random.onUnitSphere * rangeRadius.GetRandom())); } return(transform.TransformPoint(Random.insideUnitSphere * radius)); }
protected Vector2 GetPosition(float angle) { float a = Random.Range(MinAngle * Mathf.Deg2Rad, MaxAngle * Mathf.Deg2Rad); Vector2 pos = Vector3.zero; pos.x = Mathf.Cos(a); pos.y = Mathf.Sin(a); return(pos * radius.GetRandom()); }
private IEnumerator SpawnNPC() { while (!STOP) { if (!IsVisible) { yield return(new WaitForSeconds(TimeDelay.GetRandom())); Instantiate(NPCS[Random.Range(0, NPCS.Length)], transform.position, Quaternion.identity); } } }