0.4
is a magic number Open
_spine.stateData.setMix("jump", "walk", 0.4);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
0.2
is a magic number Open
_spine.stateData.setMix("walk", "jump", 0.2);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
0x00FF66
is a magic number Open
backgroundColor = 0x00FF66;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
1.5
is a magic number Open
_spine.scale.set(1.5);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
String jump
appears 3 times in the file Open
_spine.state.setAnimation(0, "jump", false);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks for multiple occurrences of the same string literal within a single file. Code duplication makes maintenance more difficult, so it's better to replace the multiple occurrences with a constant.
String walk
appears 3 times in the file Open
_spine.state.setAnimation(0, "walk", true);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks for multiple occurrences of the same string literal within a single file. Code duplication makes maintenance more difficult, so it's better to replace the multiple occurrences with a constant.
String walk
appears 4 times in the file Open
_spine.state.addAnimation(0, "walk", true, 0);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks for multiple occurrences of the same string literal within a single file. Code duplication makes maintenance more difficult, so it's better to replace the multiple occurrences with a constant.
Invalid method name signature: main
(name should be ~/^_[a-z][a-zA-Z0-9]*$/
) Open
static function main() {
new Main();
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that method names conform to a format specified by the format
property.
Invalid method name signature: onAssetsLoaded
(name should be ~/^_[a-z][a-zA-Z0-9]*$/
) Open
function onAssetsLoaded() {
_spine = new Spine(Reflect.field(_loader.resources, "spineboy").spineData);
_spine.position.set(renderer.width / 2, renderer.height);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that method names conform to a format specified by the format
property.