how to add target lik my game is fish eating game and i want to set a target lik that fish has to eat the targetd number of fishes in order to reach next level..
You just need some instance fields (like the 'wormsEaten' field in the Crab tutorial scenario) to track the level number, the target number of fish to eat and whatever else needs to be kept track of. However, one field (the field holding the level number) would be sufficient to determine the rest (without needing fields for them).
As far as code, without any to go on, help is limited (or non-existent).