| 1234567891011121314151617181920212223242526272829 |
- cc.Class({
- extends: cc.Component,
- properties: {
- },
- Test:function()
- {
- this.schedule(function () {
- this.ConvertNumToTexture(9);
- this.schedule(function () {
- this.ConvertNumToTexture(0);
- },1,0,0);
- },1,0,0);
- },
- start () {
- this.CurrentNum = 0;
- },
- ConvertNumToTexture:function(num)
- {
- this.node.setPosition(this.node.position.x-(num-this.CurrentNum)*41,this.node.position.y);
- var aSprite = this.node.getComponent(cc.Sprite);
- var FillStart = aSprite.fillStart = num/10;
- this.CurrentNum = num;
- }
- });
|