Stage: my living room

Actors: suitcase, sweets

Keywords: class, game object, float, get component

What is AudioReverbZone?

It is a suitcase, and its name is reverbZone.

AudioRevrbZone reverbZone ;

What do I need to put in that suitcase?

Decay time. It is a kind of sweets, there are many kinds of sweets in my suitcase, this type is float.

How to place sweet inside it?

To replace the general Decay time with myDecayTime, the process of giving the name includes 2 steps:

S1. public: myDecayTime is a float, floating number. I pick it from a range of sweets, the one I pick is 0.0f.

S2.  =: assign new float to the bag.

[Range (0,0f.20.0f)] public float myDecayTime=0.0f ;

//myDecayTime a float sweets, it is publc, anyone could take it without permision. Now it is 0.0, you can shift it to any other sweet in the Range as you want.

So the new bag with sweets is settled well. My pc need to find my old bag.

Now I only know that the bag is in the suitcase called AudioReverbZone. And all the suitcase is called a game object in pc’s world, its type is AudioRverbZone. This type is written with other’s code and packed with function. So it could be seen as a class. The action of taking it is GetComponent.

reverbZone = GetComponent<AudioRevervZone>();

//I take a game object whose type is AudioReverbZone, and assign it to the float reverbZone. This game object should be attached with script and function, other wise it won’t work.

How to set the suitcase change colour according to sweets?

Put it to updates!

reverbZone.decayTime = myDecayTime ;

// I put my sweet (myDecayTime) into suitcase (reverbZone)

Note for today

I review the basic foundation of C#.

I may need to review the C# class or continue it directly from tomorrow.

And when I finish it, I found it is not so necessary to do that.

What I need is to let space sounds like a bathroom, record, repear, record again.

So tmr, I need to:

1 review the recording coding

2 edit a clip of I am sitting in a room

3 make it could be recorded.