Skip to content

Resolve "modify character body classes for better usability"

Closes #23

Remarks

  • changed name of CharacterBody.swift to Character.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.
  • we need to check before using frame

    • IMG_4861
      • this is the screenshot of tutorial scene,
      • the red square is indicating the frame that we call frame directly in the class, e.g. image
    • IMG_4860
      • this is the game scene, and as you can see, the red square, which indicates the frame of the scene, is different from the frame Tutorial scene.
  • 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
Edited by Chan Yong Lee

Merge request reports