first of all, sorry for my english.
I made game objectobjects A, B. andAnd each has animtoranimator, and it has the same animation. andAnd they are inherited class of Base class.
iI trigger animation on A object, and the animation has callback and invoke it when the animation endends. theThe callback setsets bool value true.
myMy expectation was, the callback will only change bool value in A. butBut bool value in B was changed. itIs this natural?
public class BaseClass
{
public bool triggered;
}
public class A : BaseClass
{
public void OnAnimEnd()
{
triggered = true;
}
}
public class B : BaseClass
{
public void OnAnimEnd()
{
triggered = true;
}
}