private void initResource() { resource = resourceMap.GetComponent <MarineResourceBehavior>(); UpdateResource += resource.OnUpdateResource; Debug.Log("Resource initialized"); }
// Start is called before the first frame update void Start() { resource = resourceMap.GetComponent <MarineResourceBehavior>(); UpdateResource += resource.OnUpdateResource; init(); // InvokeRepeating("OnBeginDay", 1f, 1f); StartCoroutine("Step"); }