private void _ChangeResourceProductionEvent(object sender, ChangeResourceProductionEventArgs e) { Resource resource = this.getResource(e.resourceType); if (resource != null) { resource.changeProduction((int)e.production); } else { if (e.production >= 0) { this.addResource(e.resourceType, (int)e.production); } } }