public void SetFarmData(Farm farm) { _farm = farm; if (!_farm.valid) { Icon.SetClip(FarmIcon.Type.Empty, 0); Window.SetText(string.Empty); CareButton.Lock(); WaterButton.Lock(); } else { Icon.SetClip(Function.SeedId2Type(_farm.id), farm.growth); Window.SetText(GameData.GameStatus.Plants[_farm.id].name); if (farm.care) { CareButton.Lock(); } else { CareButton.Unlock(); } if (farm.water) { WaterButton.Lock(); } else { WaterButton.Unlock(); } } }
void Start() { _model = App.Instance.FarmModel; Init(); }