22 #include "MASwitchVolumeControl.hpp" 24 #include "types/MAAudio.hpp" 25 #include "types/MABodyMotion.hpp" 26 #include "types/MAHead.hpp" 27 #include "types/MALeg.hpp" 28 #include "types/MARobotState.hpp" 29 #include "types/MATorso.hpp" 30 #include "controllers/MALedsController.hpp" 31 #include "controllers/MASpeakerController.hpp" 32 #include "MALookForAbyss.hpp" 42 if (MA::RobotState->Torso->BackFButtonPressed > 80 &&
43 MA::RobotState->Torso->BackMButtonPressed == 0 &&
44 MA::RobotState->Torso->BackRButtonPressed == 0 &&
45 MA::RobotState->Torso->BackStroked < 40 &&
46 !MA::RobotState->LegLF->Moving && !MA::RobotState->LegLH->Moving &&
47 !MA::RobotState->LegRF->Moving && !MA::RobotState->LegRH->Moving &&
48 !MA::RobotState->Head->MouthMoving &&
49 MA::RobotState->Audio->RemainingPlaybackTime == 0 &&
50 MA::RobotState->BodyMotion->Flying == 0 &&
61 MA::RobotState->Audio->FullVolume = !MA::RobotState->Audio->FullVolume;
62 if (MA::RobotState->Audio->FullVolume == 1)
64 MA::Speaker->SetVolume(MA::HighVolume);
71 MA::Speaker->SaveVolumeControl();
virtual void ActivatingActions() override
Perform actions when the behavior is being activated.
#define MABEHAVIOR_EXISTS(_behavior)
Check if a behavior exists.
int PlaySound(const std::string &name)
Play a sound and register the playback.
virtual MABehavior::StimulusLevelType GetCurrentStimulus() override
Get the current behavior stimulus.
void SetSelfActivationDuration(const int new_duration)
Set the self-activation duration.
std::string MCGetClassName(T *instance=nullptr, const std::string &name_suffix="")
Get a class name.
void StartTransition(MAController &controller, const std::string &transition_name)
Start a transition.
Look for abyss before the dog.