コード例 #1
0
    void MakeNoise(float delay)
    {
        // Calculate random start position
        Bounds  bounds        = zone.bounds;
        Vector2 noisePosition = new Vector2(
            Random.Range(bounds.min.x, bounds.max.x),
            Random.Range(bounds.min.y, bounds.max.y));

        KyoukoEchoNoisePair noisePair = noisePairs[Random.Range(0, noisePairs.Length)];

        KyoukoEchoNoise noiseInstance = Instantiate(noise, noisePosition, transform.rotation);

        noiseInstance.SetNoise(noisePair);
        noiseInstance.Fire(kyouko.transform.position.x, kyouko.UpperBoundY, kyouko.LowerBoundY, delay);
    }
コード例 #2
0
 public void SetNoise(KyoukoEchoNoisePair noisePair)
 {
     front.sprite = noisePair.front;
     back.sprite  = noisePair.back;
 }