Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
afreytes, ๐Ÿ‘ป of ๐ŸŽ„โŒ›
afreytes, ๐Ÿ‘ป of ๐ŸŽ„โŒ›
@afreytes@mastodon.gamedev.place  ยท  activity timestamp 5 months ago

So I thought that if I did...

extends Node
class_name MyClass #as a kind of namespace

extends MyClass
class_name SubClass
const MyDir = {MyKey=MyVal}

I would be able to assign MyVal like...

var SomeVal = MyClass.SubClass.MyDir.MyKey

that doesn't work ๐Ÿค” but this does ๐Ÿ˜…

var SomeVal = SubClass.MyDir.MyKey

I wanted the class > subclass hierarchy but for ocd reasons but maybe I should just not and just name the subclass namespace_subclass

Naming things is hard.

  • Copy link
  • Flag this post
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About ยท Code of conduct ยท Privacy ยท Users ยท Instances
Bonfire social ยท 1.0.1-beta.35 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct