All Questions

Community

K
Gadzhi Kharkharov

When did the PlayerState class appear?

The video starts with a script extending the PlayerState class, but there weren't any steps for creating it previously.
  • Nathan Lovato replied
    Solution

    I wonder where it's gone, I remember recording and editing that part. Thanks for letting me know, I'll look into it and upload a fix.

    In the meantime, here's the PlayerState code, it's only some boilerplate to get autocompletion for player and skin:

    extends State
    class_name PlayerState
    
    
    var player: Player
    var skin: Mannequiny
    
    
    func _ready() -> void:
    	yield(owner, "ready")
    	player = owner
    	skin = owner.skin
    
    
  • Nathan Lovato replied