home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 February / Gamestar_81_2006-02_dvd.iso / Red Shark / Common / SmallAsianHouse.script < prev    next >
Encoding:
Text File  |  2001-10-05  |  1.6 KB  |  64 lines

  1. //-------------------------------------------------------------------
  2. //
  3. //  This code is copyright 2001 by G5 Software.
  4. //  Any unauthorized usage, either in part or in whole of this code
  5. //  is strictly prohibited. Violators WILL be prosecuted to the
  6. //  maximum extent allowed by law.
  7. //
  8. //-------------------------------------------------------------------
  9.  
  10. class CSmallAsianHouseMesh_1
  11. {
  12.   string MeshFile = "Models/B_Asian_1.mesh";
  13.   string SkinFile = "Models/B_Asian_1.skin";
  14. }
  15.  
  16. class CSmallAsianHouseMesh_2
  17. {
  18.   string MeshFile = "Models/B_Asian_2.mesh";
  19.   string SkinFile = "Models/B_Asian_2.skin";
  20. }
  21.  
  22. class CSmallAsianHouseMesh_3
  23. {
  24.   string MeshFile = "Models/B_Asian_7.mesh";
  25.   string SkinFile = "Models/B_Asian_7.skin";
  26. }
  27.  
  28. class CSmallAsianHouseStateControl extends CUnitLifeControl
  29. {
  30.   void CSmallAsianHouseStateControl()
  31.   {
  32.     CUnitLifeControl(1500.0);
  33.     m_DestroyPause = 20.0;
  34.     m_ExplosionId  = "EXPLID_BuildingExplosion";
  35.   }
  36. }
  37.  
  38. // Building without ground control (for use in villages)
  39. class CBaseSmallAsianHouse extends CBuilding, CUnitWithStateControl
  40. {
  41.   array m_MeshClassNames = array(
  42.       "CSmallAsianHouseMesh_1",
  43.       "CSmallAsianHouseMesh_2",
  44.       "CSmallAsianHouseMesh_3"
  45.     );
  46.  
  47.   void CBaseSmallAsianHouse()
  48.   {
  49.     int MeshNumber = rand_int(m_MeshClassNames.size());
  50.     InitializeModelAsStatic(m_MeshClassNames[MeshNumber]);
  51.     CUnitWithStateControl("CSmallAsianHouseStateControl");
  52.   }
  53. }
  54.  
  55. // Single game object
  56. class CMountedSmallAsianHouse extends CBaseSmallAsianHouse
  57. {
  58.   void CMountedSmallAsianHouse()
  59.   {
  60.     InitializeGroundControl();
  61.   }
  62. }
  63.  
  64.