static public object Cropped(this Stroq stroke, Stroq balance, CropTest test) { object sel = null; DictLookup dict = null; if (!stroke.Property.Exists(CROP)) { dict = new DictLookup(); stroke.Property[CROP] = dict; } else { dict = (DictLookup)stroke.Property[CROP]; } if (dict.ContainsKey(test)) { sel = dict[test]; } else { sel = test(stroke, balance); dict.Add(test, sel); } return(sel); }
// Start is called before the first frame update void Start() { fishingGame = FindObjectOfType <Fishing>(); crops = FindObjectOfType <CropTest>(); if (feedbackPanel.activeInHierarchy) { feedbackPanel.SetActive(false); } }