public void Effect(HexUnit unit) { switch (itemType) { case HexItemType.Treasure: unit.Score += 300; unit.GetTreasure(); break; case HexItemType.Key: unit.SetKey(true); break; case HexItemType.Coin: unit.Score += 50; break; case HexItemType.Bonus: unit.Score += 100; break; case HexItemType.Bomb: unit.SetZeroSpeed(); break; case HexItemType.Poison: unit.GetItem(itemType); break; case HexItemType.Energy: unit.SpeedEffect(20, 3); break; case HexItemType.FakeTreasureItem: unit.GetItem(itemType); break; case HexItemType.Change: unit.GetItem(itemType); break; case HexItemType.FakeTreasure: unit.SetKey(false); break; } }