public override void HarvestHere(MonsterInteraction m) { Debug.Log("Harvest at Work tile"); HarvestCrop(); UpdateStatus(actionIndex, m); }
public override void ActionResult(int index, MonsterInteraction m) { switch (index) { case (0): Debug.Log("Idle"); break; case (1): HarvestHere(m); break; case (2): WaterHere(m); break; case (3): EatHere(m); break; case (4): SleepHere(m); break; default: Debug.Log("Index ERROR"); break; } float hungerAmount = behaviorBook.behaviorDictionary[index].hungerAmount; float tirenessAmount = behaviorBook.behaviorDictionary[index].tirenessAmount; float emotionAmount = behaviorBook.behaviorDictionary[index].emotionAmount; m.SetStatus(hungerAmount, tirenessAmount, emotionAmount); }
public void CallTrainningPopup() { if (monster == null) { monster = FindObjectOfType <MonsterInteraction>(); } if (monster.canTrain) { if (actionIndex == 0 && monster.canTrain) { // status trainingPopup.GetComponent <TrainningPopup>().ActivatePopup(actionIndex, states, GetQS()); isTrainable = true; } else if (actionIndex == 1 && TileManager.Instance.tileTarget.typeTile == TypeTile.WorkTile && monster.canTrain) { Debug.Log("Action index: " + ", type tile: " + TypeTile.WorkTile); // crop info trainingPopup.GetComponent <TrainningPopup>().ActivatePopup(actionIndex, states, GetQS()); isTrainable = true; } } else { isWaitReward = true; trainingPopup.GetComponent <TrainningPopup>().UpdatePopup(TileManager.Instance.tileTarget.typeTile); //trainingPopup.GetComponent<TrainningPopup>().ActivateNoTrainPopup(); isTrainable = false; } SetTrainingPopup(true); }
public override void ActionResult(int index, MonsterInteraction m) { actionIndex = index; switch (index) { case (0): Debug.Log("Idle"); break; case (1): HarvestHere(m); break; case (2): WaterHere(m); break; case (3): EatHere(m); break; case (4): SleepHere(m); break; default: Debug.Log("Index ERROR"); break; } }
private void UpdateStatus(int index, MonsterInteraction m) { float hungerAmount = behaviorBook.behaviorDictionary[index].hungerAmount; float tirenessAmount = behaviorBook.behaviorDictionary[index].tirenessAmount; float emotionAmount = behaviorBook.behaviorDictionary[index].emotionAmount; m.SetStatus(hungerAmount, tirenessAmount, emotionAmount); }
public override void EatHere(MonsterInteraction m) { Debug.Log("Eat at Work tile"); if (EatCrop()) { UpdateStatus(actionIndex, m); } }
public override void WaterHere(MonsterInteraction m) { Debug.Log("Water at Work tile"); waterAmount += m.waterAmount; if (crop != null) { crop.WaterCrop(waterAmount); } SoundManager.Instance.sfxManager.PlayFromSFXObjectLibrary("Water"); UpdateStatus(actionIndex, m); }
public override void SleepHere(MonsterInteraction m) { Debug.Log("Sleep at Work tile"); UpdateStatus(actionIndex, m); }
public override void WaterHere(MonsterInteraction m) { Debug.Log("Water at Rest tile"); }
public override void SleepHere(MonsterInteraction m) { Debug.Log("Sleep at Rest tile"); }
public abstract void SleepHere(MonsterInteraction m);
public override void HarvestHere(MonsterInteraction m) { Debug.Log("Harvest at Rest tile"); }
public abstract void ActionResult(int index, MonsterInteraction m);
public abstract void PlantHere(MonsterInteraction m);
public abstract void HarvestHere(MonsterInteraction m);
public abstract void WaterHere(MonsterInteraction m);
public abstract void EatHere(MonsterInteraction m);
public override void PlantHere(MonsterInteraction m) { Debug.Log("Plant at Rest tile"); }
public override void EatHere(MonsterInteraction m) { Debug.Log("Eat at Food tile"); SoundManager.Instance.sfxManager.PlayFromSFXObjectLibrary("Eat"); }