Beispiel #1
0
 protected virtual void Awake()
 {
     m_MovementModel    = GetComponent <ICharacterMovementModel>();
     m_MovementView     = GetComponent <ICharacterMovementView>();
     m_InteractionModel = GetComponent <ICharacterInteractionModel>();
     m_TailView         = GetComponent <ICharacterTailView>();
 }
        public CharacterMovementController(ICharacterMovementModel characterMovementModel,
                                           ICharacterMovementView characterMovementView)
        {
            _characterMovementModel = characterMovementModel;
            _characterMovementView  = characterMovementView;

            characterMovementView.OnMovementInitialize += HandleInitializeParams;
            characterMovementView.OnDestinationReached += HandleDestinationReached;

            characterMovementModel.OnDestinationChanged    += HandleDestinationChanged;
            characterMovementModel.OnFindPathToDestination += HandleFindPath;
            characterMovementModel.OnVelocityChanged       += HandleVelocityChanged;
            SyncDestinations();
        }