Quote:However if I don't know how many player objects I need as the number of players is dynamic, can I make a function which will create and name these player objects?You can use a loop to create the needed quantity of player instances, these can be store in a list or a dictionary whichever is most suitable.
How to create a varying qty of instances of a Class and name them?
Messages In This Thread |
How to create a varying qty of instances of a Class and name them? - by KM007 - May-29-2020, 12:15 PM
RE: How to create Objects in Classes - by Yoriz - May-29-2020, 12:20 PM
RE: How to create a varying qty of instances of a Class and name them? - by KM007 - May-29-2020, 12:30 PM
|
Users browsing this thread: 1 Guest(s)