-
Notifications
You must be signed in to change notification settings - Fork 14
Experiment reflection #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| var buffer = System.Text.Encoding.ASCII.GetBytes(s); | ||
| this.size = buffer.Length; | ||
| this.bytes=new byte[64]; | ||
| if (size> 64){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this explicit and throw an error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| } | ||
|
|
||
| [StructLayout(LayoutKind.Sequential)] | ||
| public struct char256 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the generic approach not work? You commented out the code..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generic does not work because the size must be known at compile time.
| // Time.captureFramerate = 60; | ||
|
|
||
| Spawn(100); | ||
| Spawn(10000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The more the merrier.
| public struct ShipSensor : IComponentData | ||
| { | ||
| [Reward] | ||
| // [Reward] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the Reward Attribute, only the Sensor Attribute remains. We can change that later but for now, only one sensor is simpler.
No description provided.