feat(天赋系统): 实现天赋效果并应用至相关游戏系统
- 在 MissionCardComp 中应用 RefreshDiscount 天赋以减少刷新消耗 - 在 CardComp 中应用 BuyDiscount 天赋以减少英雄购买消耗 - 在 HInfoComp 中应用 SellBonus 天赋以增加英雄出售收益 - 统一 TalentType 枚举类型,增强类型安全性 - 更新 SingletonModuleComp 中 talents 数据结构以支持类型化 - 修改 HeroAttrsComp.getTalentValue 方法参数类型为 TalentType
This commit is contained in:
@@ -7,6 +7,8 @@ import { WxCloudApi } from "../wx_clound_client_api/WxCloudApi";
|
||||
import { GameEvent } from "./config/GameEvent";
|
||||
import { GameScoreStats } from "./config/HeroAttrs";
|
||||
import { mLogger } from "./Logger";
|
||||
import { TalentType } from "./config/TalentSet";
|
||||
|
||||
/**
|
||||
* 用远程数据覆盖本地数据(统一方法)
|
||||
* @param remoteData 远程数据(云端或本地调试)
|
||||
@@ -16,7 +18,7 @@ interface GameDate{
|
||||
heros:any,
|
||||
fight_hero:number,
|
||||
collection?: {
|
||||
talents: Record<number, number>,
|
||||
talents: Partial<Record<TalentType, number>>,
|
||||
player_level: number,
|
||||
player_exp: number,
|
||||
talent_points: number,
|
||||
@@ -63,7 +65,7 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
heros:any= [5001]
|
||||
|
||||
collection: {
|
||||
talents: Record<number, number>;
|
||||
talents: Partial<Record<TalentType, number>>;
|
||||
player_level: number;
|
||||
player_exp: number;
|
||||
talent_points: number;
|
||||
|
||||
Reference in New Issue
Block a user