feat(map): 新增IBoxComp组件并调整ibox.prefab布局
新增IBoxComp组件用于游戏地图中的宝箱功能,包含基础UI属性定义和生命周期方法。 调整ibox.prefab的布局尺寸和子节点位置,优化视觉呈现。 移除VictoryComp中已废弃的广告复活相关代码,保持代码简洁。
This commit is contained in:
53
assets/script/game/map/IBoxComp.ts
Normal file
53
assets/script/game/map/IBoxComp.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
import { mLogger } from "../common/Logger";
|
||||
import { _decorator, Animation, AnimationClip, EventTouch, Label, Node, NodeEventType, Sprite, SpriteAtlas, Tween, tween, UIOpacity, Vec3, resources } from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { CardConfig, CardType, SpecialCardList } from "../common/config/CardSet";
|
||||
import { CardUseComp } from "./CardUseComp";
|
||||
import { HeroInfo } from "../common/config/heroSet";
|
||||
import { SkillSet } from "../common/config/SkillSet";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { oops } from "db://oops-framework/core/Oops";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
|
||||
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@ccclass('IBoxComp')
|
||||
@ecs.register('IBoxComp', false)
|
||||
export class IBoxComp extends CCComp {
|
||||
private debugMode: boolean = true;
|
||||
/** 锁定态图标节点(显示时表示本槽位锁定) */
|
||||
@property(Node)
|
||||
Line1: Node = null!
|
||||
@property(Node)
|
||||
Line2: Node = null!
|
||||
@property(Node)
|
||||
Line3: Node = null!
|
||||
@property(Node)
|
||||
Line4: Node = null!
|
||||
@property(Node)
|
||||
Line5: Node = null!
|
||||
onAdded(args: any) {
|
||||
|
||||
}
|
||||
|
||||
onLoad() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
}
|
||||
init(){
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user