| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- System.register(["__unresolved_0", "cc", "__unresolved_1"], function (_export, _context) {
- "use strict";
- var _reporterNs, _cclegacy, ParamType, AnimatorParams, _crd;
- function _reportPossibleCrUseOfParamType(extras) {
- _reporterNs.report("ParamType", "./AnimatorCondition", _context.meta, extras);
- }
- _export("default", void 0);
- return {
- setters: [function (_unresolved_) {
- _reporterNs = _unresolved_;
- }, function (_cc) {
- _cclegacy = _cc.cclegacy;
- }, function (_unresolved_2) {
- ParamType = _unresolved_2.ParamType;
- }],
- execute: function () {
- _crd = true;
- _cclegacy._RF.push({}, "13926xryDRPXJ50lCnLvy4J", "AnimatorParams", undefined);
- /**
- * 参数结构
- */
- /**
- * 状态机参数
- */
- _export("default", AnimatorParams = class AnimatorParams {
- constructor(dataArr) {
- this._paramMap = new Map();
- dataArr.forEach(data => {
- var param = {
- type: data.type,
- value: data.init
- };
- this._paramMap.set(data.param, param);
- });
- }
- getParamType(key) {
- var param = this._paramMap.get(key);
- if (param) {
- return param.type;
- } else {
- return null;
- }
- }
- setNumber(key, value) {
- var param = this._paramMap.get(key);
- if (param && param.type === (_crd && ParamType === void 0 ? (_reportPossibleCrUseOfParamType({
- error: Error()
- }), ParamType) : ParamType).NUMBER) {
- param.value = value;
- }
- }
- setBool(key, value) {
- var param = this._paramMap.get(key);
- if (param && param.type === (_crd && ParamType === void 0 ? (_reportPossibleCrUseOfParamType({
- error: Error()
- }), ParamType) : ParamType).BOOLEAN) {
- param.value = value ? 1 : 0;
- }
- }
- setTrigger(key) {
- var param = this._paramMap.get(key);
- if (param && param.type === (_crd && ParamType === void 0 ? (_reportPossibleCrUseOfParamType({
- error: Error()
- }), ParamType) : ParamType).TRIGGER) {
- param.value = 1;
- }
- }
- resetTrigger(key) {
- var param = this._paramMap.get(key);
- if (param && param.type === (_crd && ParamType === void 0 ? (_reportPossibleCrUseOfParamType({
- error: Error()
- }), ParamType) : ParamType).TRIGGER) {
- param.value = 0;
- }
- }
- autoTrigger(key) {
- var param = this._paramMap.get(key);
- if (param && param.type === (_crd && ParamType === void 0 ? (_reportPossibleCrUseOfParamType({
- error: Error()
- }), ParamType) : ParamType).AUTO_TRIGGER) {
- param.value = 1;
- }
- }
- resetAutoTrigger(key) {
- var param = this._paramMap.get(key);
- if (param && param.type === (_crd && ParamType === void 0 ? (_reportPossibleCrUseOfParamType({
- error: Error()
- }), ParamType) : ParamType).AUTO_TRIGGER) {
- param.value = 0;
- }
- }
- resetAllAutoTrigger() {
- this._paramMap.forEach((param, key) => {
- if (param.type === (_crd && ParamType === void 0 ? (_reportPossibleCrUseOfParamType({
- error: Error()
- }), ParamType) : ParamType).AUTO_TRIGGER) {
- param.value = 0;
- }
- });
- }
- getNumber(key) {
- var param = this._paramMap.get(key);
- if (param && param.type === (_crd && ParamType === void 0 ? (_reportPossibleCrUseOfParamType({
- error: Error()
- }), ParamType) : ParamType).NUMBER) {
- return param.value;
- } else {
- return 0;
- }
- }
- getBool(key) {
- var param = this._paramMap.get(key);
- if (param && param.type === (_crd && ParamType === void 0 ? (_reportPossibleCrUseOfParamType({
- error: Error()
- }), ParamType) : ParamType).BOOLEAN) {
- return param.value;
- } else {
- return 0;
- }
- }
- getTrigger(key) {
- var param = this._paramMap.get(key);
- if (param && param.type === (_crd && ParamType === void 0 ? (_reportPossibleCrUseOfParamType({
- error: Error()
- }), ParamType) : ParamType).TRIGGER) {
- return param.value;
- } else {
- return 0;
- }
- }
- getAutoTrigger(key) {
- var param = this._paramMap.get(key);
- if (param && param.type === (_crd && ParamType === void 0 ? (_reportPossibleCrUseOfParamType({
- error: Error()
- }), ParamType) : ParamType).AUTO_TRIGGER) {
- return param.value;
- } else {
- return 0;
- }
- }
- });
- _cclegacy._RF.pop();
- _crd = false;
- }
- };
- });
- //# sourceMappingURL=5311e24d68857b28eb676fa5f1899f1955268dfe.js.map
|