protected void Start() { context = new ContextGamePlay() { CallBack = GoToNext, myRB = FindObjectOfType <RobotManager>(), myTM = FindObjectOfType <TurnManager>(), myCM = FindObjectOfType <CardManager>() }; myAnim = GetComponent <Animator>(); states = new List <StateBase>(); foreach (StateBase state in myAnim.GetBehaviours <StateBase>()) { states.Add(state.Setup(context)); } }
public override StateBase Setup(ContextGamePlay _context) { myContext = _context; return this; }
public abstract StateBase Setup(ContextGamePlay _context);