C++ 游戏角色类 API 文档 - 角色属性和状态

该文档详细介绍了 C++ 游戏角色类中用于管理角色属性、状态和交互的 API 函数。

角色高亮

  • void ShowCharacterHighLight(); 显示角色高亮
  • void HideCharacterHighLight(); 隐藏角色高亮

角色属性

  • void SetPlayerUniqueId(int64_t Val); 设置玩家唯一 ID
  • void SetPlayerType(EGameCharactType Val); 设置玩家类型
  • void SetPlayerName(class FString Val);* 设置玩家名称
  • int64_t GetPlayerUniqueId(); 获取玩家唯一 ID
  • EGameCharactType GetPlayerType(); 获取玩家类型
  • class FString GetPlayerName(); 获取玩家名称
  • int64_t GetPlayerGameMapId(); 获取玩家所在地图 ID

装备光照

  • void SetEquipLight(int32_t Intensity, const struct FColor& Color, float Radius, float SourceRadius); 设置装备光照强度、颜色、半径和源半径

模型旋转

  • void ProcessCustomMeshRotation(float Dt, const struct FRotator& OldMeshRotator); 处理自定义模型旋转
  • struct FRotator GetRotateVelocity(); 获取旋转速度

状态管理

  • void OnWaterStateChanged(bool IsWater); 当水状态改变时调用
  • bool IsWater(); 是否在水中
  • bool IsInNowSwimArea(); 是否在当前游泳区域内
  • void OnSpecialPropertyChange(EPlayerPropertyType Type, int32_t NewValue, int32_t OldValue); 当特殊属性改变时调用
  • void OnFallingStateChanged(bool bIsFalling); 当掉落状态改变时调用
  • bool CheckCharacterInWater(); 检查角色是否在水中

组件管理

  • class UComponentMiddle GetMiddleComponent();* 获取中间组件
  • class UActorComponent GetGameComponent(EGameComponentType Type);* 获取游戏组件

静态类函数

  • static UClass StaticClass();* 静态类函数
C++ 游戏角色类 API 文档 - 角色属性和状态

原文地址: https://www.cveoy.top/t/topic/nKVd 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录