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

@ -90,6 +90,13 @@ namespace Actions {
}
}
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) {
if(crop.Planted && crop.Hydrated) {
@ -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;
}

View file

@ -137,21 +137,12 @@
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.nuget.newtonsoft-json": {
"version": "3.0.2",
"depth": 2,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.services.core": {
"version": "1.3.1",
"version": "1.0.1",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.nuget.newtonsoft-json": "3.0.2",
"com.unity.modules.androidjni": "1.0.0"
"com.unity.modules.unitywebrequest": "1.0.0"
},
"url": "https://packages.unity.com"
},

View file

@ -1,2 +1,2 @@
m_EditorVersion: 2021.3.2f1
m_EditorVersionWithRevision: 2021.3.2f1 (d6360bedb9a0)
m_EditorVersion: 2021.3.1f1
m_EditorVersionWithRevision: 2021.3.1f1 (3b70a0754835)