File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Source/kbengine_ue4_demo/ue4_scripts Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,12 @@ class KBENGINE_UE4_DEMO_API AGameEntity : public ACharacter
5656 }
5757
5858public:
59+ UPROPERTY (EditAnywhere, BlueprintReadWrite, Category = KBEngine)
60+ float modelScale;
61+
62+ UPROPERTY (EditAnywhere, BlueprintReadWrite, Category = KBEngine)
63+ int modelID;
64+
5965 UPROPERTY (EditAnywhere, BlueprintReadWrite, Category = KBEngine)
6066 float moveSpeed;
6167
Original file line number Diff line number Diff line change @@ -272,12 +272,20 @@ void AGameModeWorld::set_moveSpeed_Implementation(const UKBEventData* pEventData
272272
273273void AGameModeWorld::set_modelScale_Implementation (const UKBEventData* pEventData)
274274{
275+ const UKBEventData_set_modelScale* pData = Cast<UKBEventData_set_modelScale>(pEventData);
276+ AGameEntity* pAGameEntity = findGameEntity (pData->entityID );
275277
278+ if (pAGameEntity)
279+ pAGameEntity->modelScale = (float )(pData->modelScale / 10 .0f );
276280}
277281
278282void AGameModeWorld::set_modelID_Implementation (const UKBEventData* pEventData)
279283{
284+ const UKBEventData_set_modelID* pData = Cast<UKBEventData_set_modelID>(pEventData);
285+ AGameEntity* pAGameEntity = findGameEntity (pData->entityID );
280286
287+ if (pAGameEntity)
288+ pAGameEntity->modelID = pData->modelID ;
281289}
282290
283291void AGameModeWorld::set_entityNO_Implementation (const UKBEventData* pEventData)
You can’t perform that action at this time.
0 commit comments