protected override void InitCmd(CmdList cmdList) { cmdList.Clear(); if (plant == null) { return; } base.InitCmd(cmdList); if (!plant.mDead) { if (!plant.IsRipe) { cmdList.Remove("Get"); if (plant.NeedWater) { cmdList.Add("Water", OnWaterBtn); } if (plant.NeedClean) { cmdList.Add("Clean", OnCleanBtn); } } } else { cmdList.Remove("Get"); } cmdList.Add("Remove", OnClearBtn); }
public virtual CmdList GetCmdList() { cmdList.Clear(); return(cmdList); }