-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,646 additions
and
2,011 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,41 @@ | ||
using System; | ||
using UnityEngine; | ||
|
||
public class Resource : MonoBehaviour | ||
public class Resource | ||
{ | ||
public Resource() | ||
{ | ||
} | ||
public static string GetResourceName(Resource.Type resourceType) | ||
{ | ||
return (new string[] | ||
{ | ||
"Fuel", | ||
"Solid Fuel", | ||
"Electric Power" | ||
})[(int)resourceType]; | ||
} | ||
|
||
public string resourceName; | ||
public static string GetResourceUnit(Resource.Type resourceType) | ||
{ | ||
return (new string[] | ||
{ | ||
"t", | ||
"t", | ||
string.Empty | ||
})[(int)resourceType]; | ||
} | ||
|
||
public float resourceMass; | ||
public static bool GrupsGlobally(Resource.Type resourceType) | ||
{ | ||
return (new bool[] | ||
{ | ||
default(bool), | ||
default(bool), | ||
true | ||
})[(int)resourceType]; | ||
} | ||
|
||
public string resourceUnit; | ||
public enum Type | ||
{ | ||
Fuel, | ||
SolidFuel, | ||
Power | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.