Sherbert Lemon
❔ I have a basic structuring issue
this is unity but it doesn't really matter for the sake of this
I have a character which can move around and look around, but sometimes the movement changes and the mouse movements might be menus
so I have a main class and an array of possible active classes for controlling movement, and another array for controling viewing, along with a variable for the current one of each. Sometimes the movement class has to get information from the viewing class, how should i structure this
i think that having a reference between the two will make it bad, I am not sure honestly, and I am not sure with the rest of the structure
4 replies
❔ How do I refactor this?
I am working with a grid of tiles, each tile has an int, which is made up of 4 bytes which represent what value in an enum each side of the tile is in.
This means I have a lot of things that need to run after a few calculations are done in a loop of adjacent tiles
here is most of the repeated code
This seems like a problem that would be solved with a functional language, but how would I allow for a few functions reuse this portion of code, adding a new bit on the end without copying and pasting all the starting stuff
4 replies
❔ How Would I extract a single byte from an int
In my project, I have information which is effectively a byte[4] stored in an int32, I want to grab a specific byte from this
I currently have the code
this produces an error as it should, but how would I do this properly
29 replies
Error CS353 When it doesn't make sense for this situation
A result of a stackalloc expression of type 'Span<int>' cannot be used in this context because it may be exposed outside of the containing method
however it isn't exposed out of the method, I will post the code in another message as it is a lil long
37 replies
System.AccessViolation when passing a fixed pointer to opentk [Answered]
https://discord.com/channels/143867839282020352/1042197174982811719/1042197174982811719
- continuing on from this post, I now get a access violation when I pass it and don't know why, can anyone shed any light on what could cause it?
7 replies
Where do I download the .net framework sdks [Answered]
I have a rather old program I am trying to run and I need the sdk for 4.5.2 but on the https://dotnet.microsoft.com/en-us/download/visual-studio-sdks site the framework developer pack's don't install in the same way as the current sdks, where do they install and how do I get it working?
7 replies