コード例 #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);
            }
        }
    }