导航页跳转处理中
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -14,6 +14,7 @@ import { Talent } from "../Role/Talent";
|
|||||||
import { Talents } from "../common/config/TalentSet";
|
import { Talents } from "../common/config/TalentSet";
|
||||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||||
import { BossViewComp } from "../Boss/BossViewComp";
|
import { BossViewComp } from "../Boss/BossViewComp";
|
||||||
|
import { Position } from "../../../../extensions/oops-plugin-framework/assets/libs/gui/badge/Badge";
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
/** 视图层对象 */
|
/** 视图层对象 */
|
||||||
@@ -22,12 +23,17 @@ const { ccclass, property } = _decorator;
|
|||||||
export class CardControllerComp extends CCComp {
|
export class CardControllerComp extends CCComp {
|
||||||
touch_time:number = 0
|
touch_time:number = 0
|
||||||
in_touch:boolean = false
|
in_touch:boolean = false
|
||||||
|
bbg:any=null
|
||||||
|
bbg_y:number=45
|
||||||
|
bbg_x:any=[-300,-150,0,150,300]
|
||||||
protected onLoad(): void {
|
protected onLoad(): void {
|
||||||
|
this.bbg=this.node.getChildByName("bar").getChildByName("bbg")
|
||||||
}
|
}
|
||||||
start() {
|
start() {
|
||||||
this.hh_hide()
|
this.hero_home_hide()
|
||||||
this.m_hide()
|
this.mission_hide()
|
||||||
|
this.bbg=this.node.getChildByName("bar").getChildByName("bbg")
|
||||||
|
this.bbg.setPosition(v3(this.bbg_x[2],this.bbg_y))
|
||||||
}
|
}
|
||||||
|
|
||||||
show_info(uuid:number,type:number){
|
show_info(uuid:number,type:number){
|
||||||
@@ -40,61 +46,84 @@ export class CardControllerComp extends CCComp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
hh_show(){
|
bar_change(e:any,args:any){
|
||||||
|
switch(args){
|
||||||
|
case "hero":
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
hero_home_show(){
|
||||||
let node=this.node.getChildByName("hero_home")
|
let node=this.node.getChildByName("hero_home")
|
||||||
node.active = true
|
node.active = true
|
||||||
tween(node).to( 0.1,{ position: v3(0,node.position.y)}, ).start();
|
tween(node).to( 0.1,{ position: v3(0,node.position.y)}, ).start();
|
||||||
}
|
}
|
||||||
hh_hide(){
|
hero_home_hide(){
|
||||||
let node=this.node.getChildByName("hero_home")
|
let node=this.node.getChildByName("hero_home")
|
||||||
node.active = false
|
node.active = false
|
||||||
// tween(node).to( 0.1,{ position: v3(2000,node.position.y)}, ).start();
|
// tween(node).to( 0.1,{ position: v3(2000,node.position.y)}, ).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
mh_show(){
|
mission_home_show(){
|
||||||
this.node.getChildByName("mission_home").active=true;
|
this.node.getChildByName("mission_home").active=true;
|
||||||
}
|
}
|
||||||
mh_hide(){
|
mission_home_hide(){
|
||||||
this.node.getChildByName("mission_home").active=false;
|
this.node.getChildByName("mission_home").active=false;
|
||||||
}
|
}
|
||||||
m_show(){
|
mission_show(){
|
||||||
this.node.getChildByName("mission").active = true;
|
this.node.getChildByName("mission").active = true;
|
||||||
}
|
}
|
||||||
m_hide(){
|
mission_hide(){
|
||||||
this.node.getChildByName("mission").active = false;
|
this.node.getChildByName("mission").active = false;
|
||||||
}
|
}
|
||||||
to_mission(){
|
|
||||||
this.hh_hide()
|
|
||||||
this.mh_show()
|
|
||||||
this.m_hide()
|
|
||||||
this.node.getChildByName("bar").active=true;
|
|
||||||
this.node.getChildByName("bar").getChildByName("mission_btn").getChildByName("bg").active=true
|
|
||||||
this.node.getChildByName("bar").getChildByName("hero_btn").getChildByName("bg").active=false
|
|
||||||
this.node.getChildByName("bar").getChildByName("home_btn").getChildByName("bg").active=false
|
|
||||||
|
|
||||||
}
|
|
||||||
mission_start(){
|
mission_start(){
|
||||||
this.node.getChildByName("bar").active=false;
|
this.node.getChildByName("bar").active=false;
|
||||||
this.mh_hide()
|
this.mission_home_hide()
|
||||||
this.m_show();
|
this.mission_show();
|
||||||
smc.mission.play = true;
|
smc.mission.play = true;
|
||||||
// oops.message.dispatchEvent("mission_start")
|
// oops.message.dispatchEvent("mission_start")
|
||||||
}
|
}
|
||||||
to_home(){
|
to_mission(){
|
||||||
this.mh_hide()
|
this.hero_home_hide()
|
||||||
this.hh_hide()
|
this.mission_home_show()
|
||||||
this.m_hide()
|
this.mission_hide()
|
||||||
this.node.getChildByName("bar").getChildByName("mission_btn").getChildByName("bg").active=false
|
this.node.getChildByName("bar").active=true;
|
||||||
this.node.getChildByName("bar").getChildByName("hero_btn").getChildByName("bg").active=false
|
// tween(this.bbg).to(0.1,{Position:v3(this.bbg_x[2],this.bbg_y)}).start()
|
||||||
this.node.getChildByName("bar").getChildByName("home_btn").getChildByName("bg").active=true
|
this.bbg.setPosition(this.bbg_x[2],this.bbg_y)
|
||||||
|
|
||||||
|
}
|
||||||
|
to_shop(){
|
||||||
|
this.mission_home_hide()
|
||||||
|
this.hero_home_hide()
|
||||||
|
this.mission_hide()
|
||||||
|
// tween(this.bbg).to(0.1,{Position:v3(this.bbg_x[0],this.bbg_y)}).start()
|
||||||
|
this.bbg.setPosition(this.bbg_x[0],this.bbg_y)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
to_hero(){
|
to_hero(){
|
||||||
this.mh_hide()
|
this.mission_home_hide()
|
||||||
this.hh_show()
|
this.hero_home_show()
|
||||||
this.m_hide()
|
this.mission_hide()
|
||||||
this.node.getChildByName("bar").getChildByName("mission_btn").getChildByName("bg").active=false
|
// tween(this.bbg).to(0.1,{Position:v3(this.bbg_x[1],this.bbg_y)}).start()
|
||||||
this.node.getChildByName("bar").getChildByName("hero_btn").getChildByName("bg").active=true
|
this.bbg.setPosition(this.bbg_x[1],this.bbg_y)
|
||||||
this.node.getChildByName("bar").getChildByName("home_btn").getChildByName("bg").active=false
|
|
||||||
|
}
|
||||||
|
to_skills(){
|
||||||
|
this.mission_home_hide()
|
||||||
|
this.hero_home_hide()
|
||||||
|
this.mission_hide()
|
||||||
|
// tween(this.bbg).to(0.1,{Position:v3(this.bbg_x[3],this.bbg_y)}).start()
|
||||||
|
this.bbg.setPosition(this.bbg_x[3],this.bbg_y)
|
||||||
|
|
||||||
|
}
|
||||||
|
to_battle(){
|
||||||
|
this.mission_home_hide()
|
||||||
|
this.hero_home_hide()
|
||||||
|
this.mission_hide()
|
||||||
|
// tween(this.bbg).to(0.1,{Position:v3(this.bbg_x[4],this.bbg_y)}).start()
|
||||||
|
this.bbg.setPosition(this.bbg_x[4],this.bbg_y)
|
||||||
|
|
||||||
}
|
}
|
||||||
/** 视图对象通过 ecs.Entity.remove(ControllerComp) 删除组件是触发组件处理自定义释放逻辑 */
|
/** 视图对象通过 ecs.Entity.remove(ControllerComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||||
|
|||||||
Reference in New Issue
Block a user