You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
362 B

  1. -- 是否是轻触(轻轻地按压)
  2. function cc.Touch:isPeek()
  3. if self.getForce then
  4. print("isPeek:"..self:getForce())
  5. return self:getForce() > 0.3;
  6. end
  7. return false
  8. end
  9. -- 是否是按压(用力按压)
  10. function cc.Touch:isPop()
  11. if self.getForce then
  12. print("isPop:"..self:getForce())
  13. return self:getForce() > 0.8;
  14. end
  15. return false
  16. end