This week we have been looking into the use of classes. I decided to see if this would be of use within the game I was developing but after experimenting with codes it became clear using classes would be too complex and it would be easier to just have the action script within the timeline as the class was not recognising the stage. I would also need multiple objects for one class as I was hoping to achieve a ‘correct’ class and a ‘wrong’ class but within AS3 again this is a complex procedure and not worth it in the long run. I am however going to use a class for the ‘Swiper’ object, as it will perform the same task each time.
I have also decided to change the timer from being an animation of a clock clicking to a simple countdown, as within the design there was not room for the clock. However using a number countdown I can incorporate it easily into the design within a cloud.
I also realised I needed to add a variable into the coding so that if all the food was collected before the time ran out the player would move on to the next level. This was achieved with a true/false statement so if the objects had been hit (true) and it was both that was listed the player would progress.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment