HelloWorld.js window.Global = { gint: 168, }; cc.Class({ extends: cc.Component, properties: { label: { default: null, type: cc.Label }, // defaults, set visually when attaching this script to the Canvas text: 'Hello, World!' }, // use this for initia