DeprecatedNetworkClass.lua 583 B

12345678910111213141516171819
  1. if nil == cc.XMLHttpRequest then
  2. return
  3. end
  4. -- This is the DeprecatedNetworkClass
  5. DeprecatedNetworkClass = {} or DeprecatedNetworkClass
  6. --tip
  7. local function deprecatedTip(old_name,new_name)
  8. print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
  9. end
  10. --WebSocket class will be Deprecated,begin
  11. function DeprecatedNetworkClass.WebSocket()
  12. deprecatedTip("WebSocket","cc.WebSocket")
  13. return cc.WebSocket
  14. end
  15. _G["WebSocket"] = DeprecatedNetworkClass.WebSocket()
  16. --WebSocket class will be Deprecated,end