当前位置: 首页 游戏新闻

方舟生存进化镰刀龙代码解析 方舟生存进化镰刀龙代码展示

时间:2023-07-13 作者: 小编 阅读量: 1 栏目名: 游戏新闻 文档下载

它定义了镰刀龙的行为和特殊能力。ReaperKing_Character_BP_C类有以下属性:-bIsUsingPheromoneGlandAttack:布尔值,表示镰刀龙是否正在使用挥发腺攻击。-StopPheromoneGlandAttack():停止使用挥发腺攻击。此外,ReaperKing_Character_BP_C类还重写了BeginPlay()和Tick()方法。这是镰刀龙的部分代码展示。

以下是方舟生存进化游戏中镰刀龙的代码展示:

```

class ReaperKing_Character_BP_C : public Dino_Character_BP_C {

public:

ReaperKing_Character_BP_C();

virtual void DoAbility();

void StartPheromoneGlandAttack();

void StopPheromoneGlandAttack();

protected:

bool bIsUsingPheromoneGlandAttack;

bool bCanUsePheromoneGlandAttack;

FTimerHandle PheromoneGlandAttackTimerHandle;

UFUNCTION()

void PheromoneGlandAttack();

UFUNCTION(BlueprintCallable, Category = "ReaperKing")

bool CanUsePheromoneGlandAttack();

UFUNCTION(BlueprintCallable, Category = "ReaperKing")

void PlayPheromoneGlandAttackAnim();

virtual void BeginPlay() override;

virtual void Tick(float DeltaTime) override;

};

```

这是ReaperKing_Character_BP_C类,继承自Dino_Character_BP_C类。它定义了镰刀龙的行为和特殊能力。

ReaperKing_Character_BP_C类有以下属性:

- bIsUsingPheromoneGlandAttack:布尔值,表示镰刀龙是否正在使用挥发腺攻击。

- bCanUsePheromoneGlandAttack:布尔值,表示镰刀龙是否可以使用挥发腺攻击。

ReaperKing_Character_BP_C类有以下方法:

- DoAbility():执行镰刀龙的能力。

- StartPheromoneGlandAttack():开始使用挥发腺攻击。

- StopPheromoneGlandAttack():停止使用挥发腺攻击。

- PheromoneGlandAttack():挥发腺攻击的具体实现。

- CanUsePheromoneGlandAttack():判断镰刀龙是否可以使用挥发腺攻击。

- PlayPheromoneGlandAttackAnim():播放挥发腺攻击的动画。

此外,ReaperKing_Character_BP_C类还重写了BeginPlay()和Tick()方法。

这是镰刀龙的部分代码展示。完整代码可能还包括其他属性和方法的定义。