MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / pickLock

Method pickLock

sample_nodes/crossdoor_nodes.cpp:41–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41NodeStatus CrossDoor::pickLock()
42{
43 SleepMS(500);
44 // succeed at 3rd attempt
45 if(_pick_attempts++ > 3)
46 {
47 _door_locked = false;
48 _door_open = true;
49 }
50 return _door_open ? NodeStatus::SUCCESS : NodeStatus::FAILURE;
51}
52
53NodeStatus CrossDoor::smashDoor()
54{

Callers

nothing calls this directly

Calls 1

SleepMSFunction · 0.85

Tested by

no test coverage detected