|
@@ -25,6 +25,7 @@ import { attributes_dir } from './attributes/attributes_dir';
|
|
|
import { attributes_show } from './attributes/attributes_show';
|
|
|
import { attributes_scene_setting } from './attributes/attributes_scene_setting';
|
|
|
import { attributes_remark } from './attributes/attributes_remark';
|
|
|
+import { attributes_rotation } from './attributes/attributes_rotation';
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
@ccclass('Attributes')
|
|
@@ -34,6 +35,7 @@ export class Attributes extends Component {
|
|
|
@property(Node) attributes_remark:Node = null;
|
|
|
@property(Node) attributes_x_y:Node = null;
|
|
|
@property(Node) attributes_w_h:Node = null;
|
|
|
+ @property(Node) attributes_rotation:Node = null;
|
|
|
@property(Node) attributes_res:Node = null;
|
|
|
@property(Node) attributes_origin:Node = null;
|
|
|
@property(Node) attributes_be_event:Node = null; //被动事件
|
|
@@ -64,6 +66,7 @@ export class Attributes extends Component {
|
|
|
this.attributes_map.set("remark",this.attributes_remark)
|
|
|
this.attributes_map.set("pos",this.attributes_x_y)
|
|
|
this.attributes_map.set("size",this.attributes_w_h)
|
|
|
+ this.attributes_map.set("rotation",this.attributes_rotation)
|
|
|
this.attributes_map.set("url",this.attributes_res)
|
|
|
this.attributes_map.set("origin",this.attributes_origin)
|
|
|
// this.attributes_map.set("be_event",this.attributes_be_event)
|
|
@@ -100,6 +103,7 @@ export class Attributes extends Component {
|
|
|
this.attributes_delete.getComponent(attributes_delete).initView(this.onDelete.bind(this))
|
|
|
this.attributes_w_h.getComponent(attributes_w_h).initView(this.onChangeSize.bind(this))
|
|
|
this.attributes_x_y.getComponent(attributes_x_y).initView(this.onChangePos.bind(this))
|
|
|
+ this.attributes_rotation.getComponent(attributes_rotation).initView(this.onChangeRotation.bind(this))
|
|
|
this.attributes_origin.getComponent(attributes_origin).initView(this.onChangeOrigin.bind(this))
|
|
|
this.hideAllAtt()
|
|
|
}
|
|
@@ -109,6 +113,11 @@ export class Attributes extends Component {
|
|
|
ClientEvent.dispatchEvent(config.Event.UpdateAttributesToView,this.cur_att_data,config.attributes_list_type.remark)
|
|
|
}
|
|
|
|
|
|
+ onChangeRotation(rotation: number) {
|
|
|
+ this.cur_att_data.rotation = rotation
|
|
|
+ ClientEvent.dispatchEvent(config.Event.UpdateAttributesToView,this.cur_att_data,config.attributes_list_type.rotation)
|
|
|
+ }
|
|
|
+
|
|
|
onChangSceneTipsRuleStatus(data:scene_tips_rule_data){
|
|
|
this.cur_att_data.scene_rule_tips_data = data;
|
|
|
ClientEvent.dispatchEvent(config.Event.UpdateAttributesToView,this.cur_att_data,config.attributes_list_type.scene_rule_tips)
|
|
@@ -225,6 +234,7 @@ export class Attributes extends Component {
|
|
|
this.attributes_map.get("text_sound").active = false;
|
|
|
this.attributes_map.get("count_down").active = false;
|
|
|
this.attributes_map.get("z_index").active = false;
|
|
|
+ this.attributes_map.get("rotation").active = true;
|
|
|
if(data.widget_type===config.Widget_Type_List.DRAG_TYPE){
|
|
|
this.attributes_map.get("drop").active = true;
|
|
|
}else if(data.widget_type===config.Widget_Type_List.CLICK_TYPE){
|
|
@@ -246,7 +256,8 @@ export class Attributes extends Component {
|
|
|
this.attributes_map.get("url").active = false;
|
|
|
this.attributes_map.get("pos").active = false;
|
|
|
this.attributes_map.get("size").active = false;
|
|
|
- this.attributes_map.get("text_sound").active = true;
|
|
|
+ this.attributes_map.get("rotation").active = false;
|
|
|
+ this.attributes_map.get("rotation").active = false;
|
|
|
}else if(data.widget_type===config.Widget_Type_List.QUESTION_SELECT){
|
|
|
this.attributes_map.get("animation").active = false;
|
|
|
this.attributes_map.get("origin").active = false;
|
|
@@ -255,6 +266,7 @@ export class Attributes extends Component {
|
|
|
this.attributes_map.get("size").active = false;
|
|
|
this.attributes_map.get("pos").active = true;
|
|
|
this.attributes_map.get("question_select").active = true;
|
|
|
+ this.attributes_map.get("rotation").active = false;
|
|
|
}else if(data.widget_type===config.Widget_Type_List.COUNT_DOWN){
|
|
|
this.attributes_map.get("animation").active = false;
|
|
|
this.attributes_map.get("origin").active = false;
|
|
@@ -262,6 +274,7 @@ export class Attributes extends Component {
|
|
|
this.attributes_map.get("pos").active = true;
|
|
|
this.attributes_map.get("size").active = false;
|
|
|
this.attributes_map.get("count_down").active = true;
|
|
|
+ this.attributes_map.get("rotation").active = false;
|
|
|
}
|
|
|
}else if(data.type===config.attributes_type.scene){
|
|
|
this.hideAllAtt()
|
|
@@ -271,6 +284,7 @@ export class Attributes extends Component {
|
|
|
this.attributes_map.get("url").active = true;
|
|
|
this.attributes_map.get("animation").active = true;
|
|
|
this.attributes_map.get("scene_set").active = true;
|
|
|
+ this.attributes_map.get("rotation").active = false;
|
|
|
}
|
|
|
this.scheduleOnce(()=>{
|
|
|
this.updateAttInfo()
|
|
@@ -295,6 +309,9 @@ export class Attributes extends Component {
|
|
|
let size = this.getSizeCom()
|
|
|
size.update_att(this.cur_att_data.width,this.cur_att_data.height)
|
|
|
|
|
|
+ let rotation = this.getRotationCom()
|
|
|
+ rotation.update_att(this.cur_att_data.rotation)
|
|
|
+
|
|
|
let url = this.getUrlCom()
|
|
|
url.update_att(this.cur_att_data.src_name)
|
|
|
|
|
@@ -406,6 +423,10 @@ export class Attributes extends Component {
|
|
|
return this.attributes_map.get("size").getComponent(attributes_w_h);
|
|
|
}
|
|
|
|
|
|
+ getRotationCom(){
|
|
|
+ return this.attributes_map.get("rotation").getComponent(attributes_rotation);
|
|
|
+ }
|
|
|
+
|
|
|
getEditActiveCom(){
|
|
|
return this.attributes_map.get("active").getComponent(attributes_active);
|
|
|
}
|