View Single Post
  #2  
Old 06-06-2011, 08:07 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Is there a way to include all the above code parts into just one method like clearAircraft(general timeout, optional aircraft landing timeout, optional aircraft abandoned timeout, optional aircraft crashlended timeout) and call it in just 1 line from existing game methods? The code would then automatically understand which method it is called from and act accordingly. I assume new code can not call the existing game methods itself and we have to put at least one line in existing game methods (onTrigger, ontickgame, etc.)

It would make life of server owners much easier. I am just starting to learn C# and is interested to learn how to make code more readable and usable as encapsulated building blocks. It would be perfect to have just one code block per function.
Reply With Quote