C# Class CResource, astrochimps

Inheritance: MonoBehaviour
Exibir arquivo Open project: arcoelho01/astrochimps Class Usage Examples

Public Properties

Property Type Description
associatedExtractor Transform
resourceLevel float
resourceType eResourceType

Public Methods

Method Description
Awake ( ) : void

When the script is initialized

BuildIt ( ) : void

Override from the CBaseEntity Build an extractor in this resource site

CanWeBuildInThisResourceSite ( ) : bool

Tell if we can scavenge this resource site. To do this, it can't have an extractor yet, and must have resources left

ExtractResource ( float amount ) : ExtractedResource

Extract a certain amount of metal

Update ( ) : void

Method Details

Awake() public method

When the script is initialized
public Awake ( ) : void
return void

BuildIt() public method

Override from the CBaseEntity Build an extractor in this resource site
public BuildIt ( ) : void
return void

CanWeBuildInThisResourceSite() public method

Tell if we can scavenge this resource site. To do this, it can't have an extractor yet, and must have resources left
public CanWeBuildInThisResourceSite ( ) : bool
return bool

ExtractResource() public method

Extract a certain amount of metal
public ExtractResource ( float amount ) : ExtractedResource
amount float /// Float with the amount of resource to be extracted. This value depends of the extractor level ///
return ExtractedResource

Update() public method

public Update ( ) : void
return void

Property Details

associatedExtractor public_oe property

public Transform associatedExtractor
return Transform

resourceLevel public_oe property

public float resourceLevel
return float

resourceType public_oe property

public eResourceType resourceType
return eResourceType