home *** CD-ROM | disk | FTP | other *** search
/ UnrealScript Game Programming All in One / UnrealScriptGameProgrammingAllInOne.iso / UGPAIOListings / UGPAIOListingsCh17 / CH17LIST / Classes / CH17_02LIST.uc < prev    next >
Encoding:
Text File  |  2006-02-20  |  1.0 KB  |  41 lines

  1. // %PARAMETERS = "CH17LIST C:\UT2004"
  2. //Identifies the package
  3. //CH17_01LIST.uc
  4.  
  5. class CH17_02LIST extends Commandlet;
  6.  
  7. function int Main(string Args){
  8.  
  9.   //#1 declare an identifier of the Play type
  10.   local Play firstPlay;
  11.   //#2 create an instance of the class
  12.   firstPlay = new class'Play';
  13.  
  14.   //#3 Retrieve name of class and packatge
  15.   //and the class
  16.   Log(Chr(10) $ "  Structures to Classes" @ firstPlay.class $ Chr(10));
  17.  
  18.   //#4 Test the 10 member functions
  19.   //Send message to and Receive message from
  20.  
  21.   firstPlay.setTitle("Prometheus Bound");
  22.   Log("  Play title:         " $ firstPlay.getTitle() );
  23.  
  24.   firstPlay.setAuthor("Aeschylus");
  25.   Log("  Author of play:     " $ firstPlay.getAuthor() );
  26.  
  27.   //#5 ineger value
  28.   firstPlay.setCastNumber(8);
  29.   Log("  Number of players:  " $ firstPlay.getCastNumber() );
  30.  
  31.   firstPlay.setReference(40);
  32.   Log("  Reference page:     " $ firstPlay.getReference() );
  33.  
  34.   firstPlay.setPrimeChar("Prometheus");
  35.   Log("  Primary character:  " $ firstPlay.getPrimeChar() );
  36.  
  37.  
  38.   return 0;
  39. }
  40.  
  41.