public CharacterMachineState(CharacterStateMachine stateMachine) { Machine = stateMachine; control = Machine.Character.GetComponentInFamily <CharacterControlInput>(); animator = Machine.Character.GetComponentInFamily <CharacterAnimator>(); motion = Machine.Character.GetComponentInFamily <Rigidbody2DMotion>(); }
protected override void OnAwake() { controller = GetComponentInParent <CharacterControlInput>(); }