"use strict";
cc._RF.push(module, 'bacfcFr33pNCK6U/1wNz5NO', 'mouse');
// WL01/script/mouse.js

"use strict";

var _util = require("../script/util");

cc.Class({
  "extends": cc.Component,
  name: "Mouse",
  properties: {
    showTitle: {
      "default": null,
      type: cc.Label
    }
  },
  init: function init() {
    (0, _util.playDragonBoneAnimation)(this.node, 'normal', -1);
  },
  setTitle: function setTitle(text) {
    this.showTitle.string = text;
    this.showTitle.node.opacity = 255;
  },
  playAudio: function playAudio() {
    if (this.audio && this.audio != "") {
      (0, _util.playAudioByUrl)(this.audio);
    }
  },
  hit: function hit() {
    var _this = this;

    cc.tween(this.showTitle.node).delay(0.17).to(0.5 - 0.17, {
      opacity: 0
    }).start();
    (0, _util.playDragonBoneAnimation)(this.node, 'wrong', 1, function () {});
    cc.tween(this.node).delay(0.75).call(function () {
      WL.afterHit(_this.node);
    }).start();
  }
});

cc._RF.pop();