Question about base class references
My OOP class is a little far in my memory, we probably talked about something like this but its the kind of issue that I run into so rarely that I completely forgot how to solve it (if its possible).
Long story short, I'm making an animation engine that's kind of the C# version of Manim (or, at least, I'm trying to) and I wanted to make an animation which creates a line by interpolating its end point from its start point to whatever the target end point is.
The way an animation works conceptually is that I describe its initialization and finalization
The issue (i think, at least) is rooted in the fact that the base
What I tried doing was something like this
However, the line isn't updating. I know the issue isn't the methods for moving the endpoint, so i feel that it has to be that the reference is not the same, but i'm not sure what to do to solve this.
Long story short, I'm making an animation engine that's kind of the C# version of Manim (or, at least, I'm trying to) and I wanted to make an animation which creates a line by interpolating its end point from its start point to whatever the target end point is.
The way an animation works conceptually is that I describe its initialization and finalization
Start() and End() methods, and then I update the target object's state with the Update(float dt) method. The issue (i think, at least) is rooted in the fact that the base
Animation class takes in a FrameObject (the base class for every object, including Line), but the line creation animation takes in a Line, since it obviously wouldn't make sense to apply this function to a circle or something. What I tried doing was something like this
However, the line isn't updating. I know the issue isn't the methods for moving the endpoint, so i feel that it has to be that the reference is not the same, but i'm not sure what to do to solve this.