refactor: Remove ES6 module syntax and reorder script loading
This commit is contained in:
5
ai.js
5
ai.js
@@ -6,8 +6,7 @@ const ANIMAL_HUNGER_MAX = 100;
|
||||
/**********************************************************************
|
||||
* CITIZEN AI
|
||||
**********************************************************************/
|
||||
// Export functions
|
||||
export function updateCitizen(cit) {
|
||||
function updateCitizen(cit) {
|
||||
cit.hunger += HUNGER_INCREMENT;
|
||||
if(cit.hunger > HUNGER_MAX) cit.hunger = HUNGER_MAX;
|
||||
|
||||
@@ -54,7 +53,7 @@ export function updateCitizen(cit) {
|
||||
/**********************************************************************
|
||||
* ANIMAL AI
|
||||
**********************************************************************/
|
||||
export function updateAnimal(ani) {
|
||||
function updateAnimal(ani) {
|
||||
if(ani.type === "Rabbit") {
|
||||
updateRabbit(ani);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user