Resolve "modify character body classes for better usability"
Closes #23
Remarks
-
changed name of
CharacterBody.swift
toCharacter.swift
-
Characters can now be created using factory method
- Example, where characters are saved in an array
characters
characters.append(CharacterCreater.sharedCharacterCreator.createCharacter(scene: self, player: 0, color: UIColor.yellow, bodyRadius: 15, position: CGPoint(x: frame.minX, y: frame.maxY)))
- if multiple characters are created, there position should defer a bit so that they don't overlap each other.
- Example, where characters are saved in an array
-
we need to check before using
frame
-
It seems like the frame size is defined arbitrarily according to the contents in the scene
- https://developer.apple.com/documentation/spritekit/sknode/1483026-frame
- So I guess we need to check how the frame looks like when we want to position nodes relative to the frame
- I also thought of the possibility that the GameScene's frame may not be set as Landscape, but I couldn't figure it out.
- I guess we can set it as another issue when it becomes a problem