A list of type class

Hi, I’m working on Enemy Rush right now. In EnemyMover script, we are creating a list of type CLASS.:

List path = new List();

Waypoint being a class we created before (Waypoint.cs), and is still empty.
So why are we creating a list of type Waypoint. What does it means? I’m missing something here…

Hi Bibite,

A Waypoint object is one object. Our path is supposed to consist of multiple Waypoint objects. For this reason, we need a collection which is able to reference our objects.

Did this clear it up for you?


See also:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms