moved Cow.cs and Chicken.cs into Animals Folder
Chicken lays eggs now every day
This commit is contained in:
parent
4a8067d3d7
commit
2d51baacd8
10 changed files with 140 additions and 106 deletions
17
Assets/Scripts/Animals/Chicken.cs
Normal file
17
Assets/Scripts/Animals/Chicken.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using Actions;
|
||||
|
||||
namespace Animals {
|
||||
public class Chicken : Animal {
|
||||
void Start() {
|
||||
HouseController.NewDayEvent.AddListener(LayEgg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gives a Random amount of eggs to the player
|
||||
* Directly into the Inventory
|
||||
*/
|
||||
private void LayEgg() {
|
||||
ActionManager.Instance.NextDayAction(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue