var move:boolean = false;
function FixedUpdate
{
if(move == true)
{
transform.position.z += 0.1;
{
}
now i made 2 classes that inherit from Character, lets say fighter and archer.
so naturally when i set the the move variable on one of those 2 classes to true, i want the corresponding object to move. however, when i do that, ALL the objects inheriting from Character move.
first i thought that the fighter and archer class have a problem with inheriting the FixedUpdate, but changing it to a Move() class and calling it from the newly created FixedUpdates from the fighter/archer class did exactly the same.
now i’m sure there’s a simple solution to this and i’ve got something very basic really wrong. is this a js-only issue and can it be solved using C#? or did i just make some mistake?
and btw., what are the big advantages of using C#? i just can’t find any usefull document explaining that…
now ive rewritten my code to c-sharp, but im still new to this stuff… could you be a little more specific with “call the original function as first within the overriden function”. isn’t it already overwritten then? how can i call it from the inheriting class? what is “as first”?
have you tried make multiple instances of fighter? they will all move at the same time if you set the move variable to true on one fighter. what i want is to control the fighters individually (by setting each owns move variable to true, and only have that one move).