j-f-liu / canvasgames Goto Github PK
View Code? Open in Web Editor NEWThe engine of canvas games.
Home Page: http://CanvasGames.net
License: MIT License
The engine of canvas games.
Home Page: http://CanvasGames.net
License: MIT License
C:\Users\mailt\Documents\GitHub\CanvasGames>ruby build.rb
build Painter
tsc -t ES5 -d --out out/GameEngine.js GameEngine/Device.ts GameEngine/Maths.ts GameEngine/Geometry/Vector2.ts GameEngine/Geometry/Rectangle.ts GameEngine/Geometry/Circle.ts GameEngine/System/Color.ts GameEngine/System/Keys.ts GameEngine/System/Direction.ts GameEngine/Input/ButtonState.ts GameEngine/Input/Mouse.ts GameEngine/Input/Keyboard.ts GameEngine/Canvas2D.ts GameEngine/SpriteImage.ts GameEngine/SpriteSheet.ts GameEngine/GameObject.ts GameEngine/GameObjectGroup.ts GameEngine/Sprite.ts GameEngine/Particle.ts GameEngine/Tile.ts GameEngine/TileGrid.ts GameEngine/Scene.ts GameEngine/Sound.ts GameEngine/UI/Label.ts GameEngine/UI/Button.ts GameEngine/UI/Slider.ts GameEngine/Physics.ts GameEngine/Game.ts GameEngine/GameSettings.ts
error TS6053: File 'GameEngine/GameSettings.ts' not found.
GameEngine/GameObject.ts(3,15): error TS4031: Public property 'position' of exported class has or is using private name 'Vector2'.
GameEngine/GameObject.ts(4,13): error TS4031: Public property 'origin' of exported class has or is using private name 'Vector2'.
GameEngine/GameObject.ts(11,20): error TS4073: Parameter 'renderer' of public method from exported class has or is using private name 'Renderer'.
GameEngine/GameObject.ts(40,17): error TS4043: Return type of public getter 'size' from exported class has or is using private name 'Vector2'.
GameEngine/GameObject.ts(68,19): error TS4043: Return type of public getter 'region' from exported class has or is using private name 'Rectangle'.
GameEngine/GameObject.ts(72,18): error TS4043: Return type of public getter 'bound' from exported class has or is using private name 'Shape'.
GameEngine/GameObject.ts(76,22): error TS4073: Parameter 'region' of public method from exported class has or is using private name 'Rectangle'.
GameEngine/GameObject.ts(80,32): error TS4073: Parameter 'region' of public method from exported class has or is using private name 'Rectangle'.
GameEngine/GameObject.ts(84,30): error TS4073: Parameter 'region' of public method from exported class has or is using private name 'Rectangle'.
GameEngine/GameObject.ts(89,20): error TS4073: Parameter 'renderer' of public method from exported class has or is using private name 'Renderer'.
GameEngine/GameObjectGroup.ts(34,20): error TS4073: Parameter 'renderer' of public method from exported class has or is using private name 'Renderer'.
GameEngine/Physics.ts(2,43): error TS4070: Parameter 'direction' of public static method from exported class has or is using private name 'Vector2'.
GameEngine/Physics.ts(2,53): error TS4052: Return type of public static method from exported class has or is using private name 'Vector2'.
GameEngine/Physics.ts(6,57): error TS4052: Return type of public static method from exported class has or is using private name 'Vector2'.
GameEngine/Physics.ts(10,53): error TS4070: Parameter 'velocity' of public static method from exported class has or is using private name 'Vector2'.
GameEngine/Physics.ts(10,82): error TS4052: Return type of public static method from exported class has or is using private name 'Vector2'.
GameEngine/Sprite.ts(2,15): error TS4031: Public property 'velocity' of exported class has or is using private name 'Vector2'.
GameEngine/Sprite.ts(16,22): error TS4073: Parameter 'region' of public method from exported class has or is using private name 'Rectangle'.
GameEngine/Sprite.ts(20,23): error TS4073: Parameter 'region' of public method from exported class has or is using private name 'Rectangle'.
GameEngine/Sprite.ts(28,25): error TS4073: Parameter 'destination' of public method from exported class has or is using private name 'Vector2'.
GameEngine/SpriteImage.ts(2,16): error TS4031: Public property 'imageRect' of exported class has or is using private name 'Rectangle'.
GameEngine/SpriteImage.ts(3,60): error TS4063: Parameter 'imageRect' of constructor from exported class has or is using private name 'Rectangle'.
GameEngine/SpriteImage.ts(7,17): error TS4043: Return type of public getter 'size' from exported class has or is using private name 'Vector2'.
GameEngine/SpriteImage.ts(22,20): error TS4073: Parameter 'position' of public method from exported class has or is using private name 'Vector2'.
GameEngine/SpriteImage.ts(22,70): error TS4073: Parameter 'origin' of public method from exported class has or is using private name 'Vector2'.
GameEngine/SpriteImage.ts(22,106): error TS4073: Parameter 'renderer' of public method from exported class has or is using private name 'Renderer'.
GameEngine/SpriteSheet.ts(3,20): error TS4031: Public property 'sheetPosition' of exported class has or is using private name 'Vector2'.
GameEngine/SpriteSheet.ts(9,20): error TS4063: Parameter 'imageRect' of constructor from exported class has or is using private name 'Rectangle'.
GameEngine/TileGrid.ts(15,19): error TS4043: Return type of public getter 'region' from exported class has or is using private name 'Rectangle'.
GameEngine/TileGrid.ts(43,20): error TS4073: Parameter 'position' of public method from exported class has or is using private name 'Vector2'.
GameEngine/TileGrid.ts(50,20): error TS4073: Parameter 'renderer' of public method from exported class has or is using private name 'Renderer'.
GameEngine/UI/Label.ts(10,20): error TS4073: Parameter 'renderer' of public method from exported class has or is using private name 'Renderer'.
GameEngine/UI/Label.ts(28,22): error TS4073: Parameter 'region' of public method from exported class has or is using private name 'Rectangle'.
GameEngine/UI/Slider.ts(18,25): error TS4037: Parameter type of public setter 'position' from exported class has or is using private name 'Vector2'.
GameEngine/UI/Slider.ts(59,20): error TS4073: Parameter 'renderer' of public method from exported class has or is using private name 'Renderer'.
tsc -t ES5 --out out/Painter/GameWorld.js out/GameEngine.d.ts Painter/Cannon.ts Painter/Ball.ts Painter/PaintCan.ts Painter/Lives.ts Painter/Score.ts Painter/ScoreSheet.ts Painter/GameOver.ts Painter/GameWorld.ts
error TS6053: File 'out/GameEngine.d.ts' not found.
copy out/GameEngine.js out/Painter/GameEngine.js
copy LAB.min.js out/LAB.min.js
Traceback (most recent call last):
8: from build.rb:94:in `<main>'
7: from build.rb:94:in `each'
6: from build.rb:100:in `block in <main>'
5: from build.rb:76:in `build_game'
4: from build.rb:59:in `copy_file_if_newer'
3: from C:/Ruby25-x64/lib/ruby/2.5.0/fileutils.rb:432:in `copy_file'
2: from C:/Ruby25-x64/lib/ruby/2.5.0/fileutils.rb:1291:in `copy_file'
1: from C:/Ruby25-x64/lib/ruby/2.5.0/fileutils.rb:1291:in `open'
C:/Ruby25-x64/lib/ruby/2.5.0/fileutils.rb:1291:in `initialize': No such file or directory @ rb_sysopen - LAB.min.js (Errno::ENOENT)
C:\Users\mailt\Documents\GitHub\CanvasGames>ruby build.rb
build Painter
tsc -t ES5 -d --out out/GameEngine.js GameEngine/Device.ts GameEngine/Maths.ts GameEngine/Geometry/Vector2.ts GameEngine/Geometry/Rectangle.ts GameEngine/Geometry/Circle.ts GameEngine/System/Color.ts GameEngine/System/Keys.ts GameEngine/System/Direction.ts GameEngine/Input/ButtonState.ts GameEngine/Input/Mouse.ts GameEngine/Input/Keyboard.ts GameEngine/Canvas2D.ts GameEngine/SpriteImage.ts GameEngine/SpriteSheet.ts GameEngine/GameObject.ts GameEngine/GameObjectGroup.ts GameEngine/Sprite.ts GameEngine/Particle.ts GameEngine/Tile.ts GameEngine/TileGrid.ts GameEngine/Scene.ts GameEngine/Sound.ts GameEngine/UI/Label.ts GameEngine/UI/Button.ts GameEngine/UI/Slider.ts GameEngine/Physics.ts GameEngine/Game.ts GameEngine/GameSettings.ts
error TS6053: File 'GameEngine/GameSettings.ts' not found.
GameEngine/GameObject.ts(3,15): error TS4031: Public property 'position' of exported class has or is using private name 'Vector2'.
GameEngine/GameObject.ts(4,13): error TS4031: Public property 'origin' of exported class has or is using private name 'Vector2'.
GameEngine/GameObject.ts(11,20): error TS4073: Parameter 'renderer' of public method from exported class has or is using private name 'Renderer'.
GameEngine/GameObject.ts(40,17): error TS4043: Return type of public getter 'size' from exported class has or is using private name 'Vector2'.
GameEngine/GameObject.ts(68,19): error TS4043: Return type of public getter 'region' from exported class has or is using private name 'Rectangle'.
GameEngine/GameObject.ts(72,18): error TS4043: Return type of public getter 'bound' from exported class has or is using private name 'Shape'.
GameEngine/GameObject.ts(76,22): error TS4073: Parameter 'region' of public method from exported class has or is using private name 'Rectangle'.
GameEngine/GameObject.ts(80,32): error TS4073: Parameter 'region' of public method from exported class has or is using private name 'Rectangle'.
GameEngine/GameObject.ts(84,30): error TS4073: Parameter 'region' of public method from exported class has or is using private name 'Rectangle'.
GameEngine/GameObject.ts(89,20): error TS4073: Parameter 'renderer' of public method from exported class has or is using private name 'Renderer'.
GameEngine/GameObjectGroup.ts(34,20): error TS4073: Parameter 'renderer' of public method from exported class has or is using private name 'Renderer'.
GameEngine/Physics.ts(2,43): error TS4070: Parameter 'direction' of public static method from exported class has or is using private name 'Vector2'.
GameEngine/Physics.ts(2,53): error TS4052: Return type of public static method from exported class has or is using private name 'Vector2'.
GameEngine/Physics.ts(6,57): error TS4052: Return type of public static method from exported class has or is using private name 'Vector2'.
GameEngine/Physics.ts(10,53): error TS4070: Parameter 'velocity' of public static method from exported class has or is using private name 'Vector2'.
GameEngine/Physics.ts(10,82): error TS4052: Return type of public static method from exported class has or is using private name 'Vector2'.
GameEngine/Sprite.ts(2,15): error TS4031: Public property 'velocity' of exported class has or is using private name 'Vector2'.
GameEngine/Sprite.ts(16,22): error TS4073: Parameter 'region' of public method from exported class has or is using private name 'Rectangle'.
GameEngine/Sprite.ts(20,23): error TS4073: Parameter 'region' of public method from exported class has or is using private name 'Rectangle'.
GameEngine/Sprite.ts(28,25): error TS4073: Parameter 'destination' of public method from exported class has or is using private name 'Vector2'.
GameEngine/SpriteImage.ts(2,16): error TS4031: Public property 'imageRect' of exported class has or is using private name 'Rectangle'.
GameEngine/SpriteImage.ts(3,60): error TS4063: Parameter 'imageRect' of constructor from exported class has or is using private name 'Rectangle'.
GameEngine/SpriteImage.ts(7,17): error TS4043: Return type of public getter 'size' from exported class has or is using private name 'Vector2'.
GameEngine/SpriteImage.ts(22,20): error TS4073: Parameter 'position' of public method from exported class has or is using private name 'Vector2'.
GameEngine/SpriteImage.ts(22,70): error TS4073: Parameter 'origin' of public method from exported class has or is using private name 'Vector2'.
GameEngine/SpriteImage.ts(22,106): error TS4073: Parameter 'renderer' of public method from exported class has or is using private name 'Renderer'.
GameEngine/SpriteSheet.ts(3,20): error TS4031: Public property 'sheetPosition' of exported class has or is using private name 'Vector2'.
GameEngine/SpriteSheet.ts(9,20): error TS4063: Parameter 'imageRect' of constructor from exported class has or is using private name 'Rectangle'.
GameEngine/TileGrid.ts(15,19): error TS4043: Return type of public getter 'region' from exported class has or is using private name 'Rectangle'.
GameEngine/TileGrid.ts(43,20): error TS4073: Parameter 'position' of public method from exported class has or is using private name 'Vector2'.
GameEngine/TileGrid.ts(50,20): error TS4073: Parameter 'renderer' of public method from exported class has or is using private name 'Renderer'.
GameEngine/UI/Label.ts(10,20): error TS4073: Parameter 'renderer' of public method from exported class has or is using private name 'Renderer'.
GameEngine/UI/Label.ts(28,22): error TS4073: Parameter 'region' of public method from exported class has or is using private name 'Rectangle'.
GameEngine/UI/Slider.ts(18,25): error TS4037: Parameter type of public setter 'position' from exported class has or is using private name 'Vector2'.
GameEngine/UI/Slider.ts(59,20): error TS4073: Parameter 'renderer' of public method from exported class has or is using private name 'Renderer'.
tsc -t ES5 --out out/Painter/GameWorld.js out/GameEngine.d.ts Painter/Cannon.ts Painter/Ball.ts Painter/PaintCan.ts Painter/Lives.ts Painter/Score.ts Painter/ScoreSheet.ts Painter/GameOver.ts Painter/GameWorld.ts
error TS6053: File 'out/GameEngine.d.ts' not found.
copy out/GameEngine.js out/Painter/GameEngine.js
copy LAB.min.js out/LAB.min.js
Traceback (most recent call last):
8: from build.rb:94:in `<main>'
7: from build.rb:94:in `each'
6: from build.rb:100:in `block in <main>'
5: from build.rb:76:in `build_game'
4: from build.rb:59:in `copy_file_if_newer'
3: from C:/Ruby25-x64/lib/ruby/2.5.0/fileutils.rb:432:in `copy_file'
2: from C:/Ruby25-x64/lib/ruby/2.5.0/fileutils.rb:1291:in `copy_file'
1: from C:/Ruby25-x64/lib/ruby/2.5.0/fileutils.rb:1291:in `open'
C:/Ruby25-x64/lib/ruby/2.5.0/fileutils.rb:1291:in `initialize': No such file or directory @ rb_sysopen - LAB.min.js (Errno::ENOENT)
这个游戏好好玩。谢谢这么好玩的游戏。
估计这代码有几年没有维护更新了吧。我下载了代码,根据你的教程编译不成功。估计是编译文件没有更新或者哪儿有问题。
可以联系下不?这个代码有趣的
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.