-
Notifications
You must be signed in to change notification settings - Fork 1
Equipment
Zachary-Ronayne edited this page Oct 20, 2020
·
2 revisions
The generic Equipment model mostly keeps track of position and size for displaying and interacting on screen.
It stores position and size as lists. Do not directly access these fields, instead use the methods in the Controller, for example, x(), y(), width(), and height().
Mostly handles movement and positioning of the model. The majority of the functionality of Equipment will be implemented in sub classes of Equipment.
Update Function
If you have an object equipment
, you can override update
to have some code run every frame. Remember to call super.update() so that any other functionality used by parent classes is also run. For example:
update(){
super.update();
// Code to update here
}