MCPcopy Create free account
hub / github.com/Voine/ChatWaifu_Mobile / SetRandomExpression

Method SetRandomExpression

Live2D/src/main/cpp/LAppModel.cpp:674–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

672}
673
674void LAppModel::SetRandomExpression()
675{
676 if (_expressions.GetSize() == 0)
677 {
678 return;
679 }
680
681 csmInt32 no = rand() % _expressions.GetSize();
682 csmMap<csmString, ACubismMotion*>::const_iterator map_ite;
683 csmInt32 i = 0;
684 for (map_ite = _expressions.Begin(); map_ite != _expressions.End(); map_ite++)
685 {
686 if (i == no)
687 {
688 csmString name = (*map_ite).First;
689 SetExpression(name.GetRawString());
690 return;
691 }
692 i++;
693 }
694}
695
696void LAppModel::ReloadRenderer()
697{

Callers 1

OnTapMethod · 0.80

Calls 4

GetSizeMethod · 0.45
BeginMethod · 0.45
EndMethod · 0.45
GetRawStringMethod · 0.45

Tested by

no test coverage detected