MCPcopy Create free account
hub / github.com/axmolengine/axmol / SetSpriteColor

Method SetSpriteColor

tests/live2d-tests/Source/LAppModel.cpp:801–808  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

799}
800
801void LAppModel::SetSpriteColor(float r, float g, float b, float a)
802{
803 if (_renderSprite != NULL)
804 {
805 _renderSprite->getSprite()->setColor(Color3B(static_cast<unsigned char>(255.0f * r), static_cast<unsigned char>(255.0f * g), static_cast<unsigned char>(255.0f * b)));
806 _renderSprite->getSprite()->setOpacity(static_cast<unsigned char>(255.0f * a));
807 }
808}

Callers 1

ChangeSceneMethod · 0.80

Calls 4

Color3BFunction · 0.85
setColorMethod · 0.45
getSpriteMethod · 0.45
setOpacityMethod · 0.45

Tested by

no test coverage detected