fixed cow

This commit is contained in:
j-weissen 2022-06-24 08:53:52 +02:00
parent d3a06effc5
commit 0fe6f1f8dd
4 changed files with 20 additions and 16 deletions

View file

@ -89,6 +89,13 @@ namespace Actions {
return rv;
}
}
public abstract class AbstractCowNextDayActionHandler : AbstractAnimalNextDayActionHandler {
public override bool Matches(GameObject gameObject) {
bool rv = base.Matches(gameObject);
return rv;
}
}
public class FarmlandTileNextDayActionHandler : AbstractFarmlandTileNextDayActionHandler {
public override void InvokeAction(GameObject gameObject) {
@ -120,4 +127,6 @@ namespace Actions {
return rv;
}
}
}

View file

@ -6,14 +6,18 @@ public class Cow : Animal {
private void Awake() {
_canBeMilked = true;
HouseController.NewDayEvent.AddListener(UpdateCanBeMilked);
HouseController.NewDayEvent.AddListener(NextDay);
}
private void NextDay() {
UpdateCanBeMilked();
//ActionManager.Instance.NextDayAction(gameObject);
}
/**
* Update the _canBeMilked bool
*/
private void UpdateCanBeMilked() {
Debug.Log("_ca" + _canBeMilked);
public void UpdateCanBeMilked() {
_canBeMilked = true;
}