예제 #1
0
    void Awake()
    {
        playerModel = GetComponent <PlayerModel>();

        QTEBuffer   = maxQTEBuffer.GetRandom();
        maxQTETimer = QTETimer;
    }
예제 #2
0
        public override Vector3 GetPosition()
        {
            if (useMinMaxRadius)
            {
                return(transform.TransformPoint(Random.onUnitSphere * rangeRadius.GetRandom()));
            }

            return(transform.TransformPoint(Random.insideUnitSphere * radius));
        }
예제 #3
0
        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());
        }
예제 #4
0
    private IEnumerator SpawnNPC()
    {
        while (!STOP)
        {
            if (!IsVisible)
            {
                yield return(new WaitForSeconds(TimeDelay.GetRandom()));

                Instantiate(NPCS[Random.Range(0, NPCS.Length)], transform.position, Quaternion.identity);
            }
        }
    }