| 238 | } |
| 239 | |
| 240 | bool Sequence::initWithTwoActions(FiniteTimeAction* actionOne, FiniteTimeAction* actionTwo) |
| 241 | { |
| 242 | AXASSERT(actionOne != nullptr, "actionOne can't be nullptr!"); |
| 243 | AXASSERT(actionTwo != nullptr, "actionTwo can't be nullptr!"); |
| 244 | if (actionOne == nullptr || actionTwo == nullptr) |
| 245 | { |
| 246 | AXLOGE("Sequence::initWithTwoActions error: action is nullptr!!"); |
| 247 | return false; |
| 248 | } |
| 249 | |
| 250 | float d = actionOne->getDuration() + actionTwo->getDuration(); |
| 251 | ActionInterval::initWithDuration(d); |
| 252 | |
| 253 | _actions[0] = actionOne; |
| 254 | actionOne->retain(); |
| 255 | |
| 256 | _actions[1] = actionTwo; |
| 257 | actionTwo->retain(); |
| 258 | |
| 259 | return true; |
| 260 | } |
| 261 | |
| 262 | bool Sequence::isDone() const |
| 263 | { |
no test coverage detected