...
 
Commits (150)
......@@ -123,7 +123,7 @@ build:osx:
stage: build
script:
- security unlock-keychain -p $MAC_KEYCHAIN_PASS
- python build.py -p mac -m release --create-dmg --sign-identity "$MAC_SIGN_ID" --agreement y
- python build.py -p mac -m release --create-dmg --agreement y
artifacts:
paths:
- publish/mac/Piktomir.dmg
......
......@@ -28,7 +28,7 @@ cmake_minimum_required(VERSION 3.6)
SET(MAJOR_VERSION "2")
SET(MINOR_VERSION "6")
SET(PATCH_VERSION "0")
SET(PATCH_VERSION "1")
set(APP_NAME PiktoMir)
project (${APP_NAME})
......
......@@ -4,7 +4,7 @@
ПиктоМир позволяет ребенку "собрать" из пиктограмм на экране компьютера несложную программу, управляющую виртуальным исполнителем-роботом.
ПиктоМир в первую очередь ориентирован на дошкольников, еще не умеющих писать или на младшеклассников, не очень любящих писать. При желании, ПиктоМир-программу можно сохранить в КуМире и продолжить работу над ней в КуМире. ПиктоМир разработан в НИИСИ РАН по заказу Российской Академии Наук.
### Текущая версия: 2.6.0 ###
### Текущая версия: 2.6.1 ###
### Кроссплатформенность ###
* Популярные браузеры: Chrome 14+, Safari 5.0+, IE9+, Firefox 3.5+.
......@@ -41,8 +41,8 @@ cd project_dir
python build.py -p platform -m target
```
**platform** - _win32, mac, ios, android, linux, web_
**target** - _release, debug_
**platform** - win32, mac, ios, android, linux, web
**target** - release, debug
* Больше информации о возможностях сборки:
```
......
......@@ -7,7 +7,7 @@
!define APP_NAME "ПиктоМир"
!define COMP_NAME "НИИСИ"
!define WEB_SITE "https://piktomir.ru"
!define VERSION "02.06.00.00"
!define VERSION "02.06.01.00"
!define COPYRIGHT "ИнфоМир © 2019"
!define DESCRIPTION "ПиктоМир-обучающая игра"
!define INSTALLER_NAME "%s"
......@@ -179,6 +179,8 @@ File "${FILE_PATH}\websockets.dll"
File "${FILE_PATH}\libcrypto-1_1.dll"
File "${FILE_PATH}\libssl-1_1.dll"
File "${FILE_PATH}\uv.dll"
File "C:\Windows\SysWOW64\ucrtbased.dll"
File "C:\Windows\SysWOW64\vcruntime140d.dll"
SetOutPath "$INSTDIR\Resources"
File "${FILE_PATH}\Resources\main.jsc"
......
Subproject commit 5a983c661d000b5a3866b25df0c9eb2e71877089
Subproject commit fefee2343459f2b056165fb448ad90d401406e76
......@@ -10,7 +10,7 @@ android {
minSdkVersion PROP_MIN_SDK_VERSION
targetSdkVersion PROP_TARGET_SDK_VERSION
versionCode 30
versionName "2.6.0"
versionName "2.6.1"
externalNativeBuild {
if (PROP_BUILD_TYPE == 'ndk-build') {
......
......@@ -757,7 +757,7 @@
LastUpgradeCheck = 0730;
TargetAttributes = {
509D4A7517EBB24E00697056 = {
DevelopmentTeam = KSK7DMN5VR;
DevelopmentTeam = C7HULG4HBX;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.Sandbox = {
......@@ -766,7 +766,7 @@
};
};
A922753C1517C094001B78AA = {
DevelopmentTeam = KSK7DMN5VR;
DevelopmentTeam = C7HULG4HBX;
SystemCapabilities = {
com.apple.InAppPurchase = {
enabled = 1;
......@@ -1063,7 +1063,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = KSK7DMN5VR;
DEVELOPMENT_TEAM = C7HULG4HBX;
GCC_DYNAMIC_NO_PIC = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = mac/Prefix.pch;
......@@ -1096,7 +1096,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = KSK7DMN5VR;
DEVELOPMENT_TEAM = C7HULG4HBX;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = mac/Prefix.pch;
......@@ -1177,7 +1177,7 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Developer";
COMPRESS_PNG_FILES = NO;
DEVELOPMENT_TEAM = KSK7DMN5VR;
DEVELOPMENT_TEAM = C7HULG4HBX;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
......@@ -1214,7 +1214,7 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Developer";
COMPRESS_PNG_FILES = NO;
DEVELOPMENT_TEAM = KSK7DMN5VR;
DEVELOPMENT_TEAM = C7HULG4HBX;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
......
......@@ -21,7 +21,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.6.0</string>
<string>2.6.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
......
......@@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.6.0</string>
<string>2.6.1</string>
<key>CFBundleSignature</key>
<string>APPL</string>
<key>CFBundleURLTypes</key>
......
......@@ -46,8 +46,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,6,0,0
PRODUCTVERSION 2,6,0,0
FILEVERSION 2,6,1,0
PRODUCTVERSION 2,6,1,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
......@@ -63,12 +63,12 @@ BEGIN
BLOCK "041904b0"
BEGIN
VALUE "FileDescription", "ПиктоМир"
VALUE "FileVersion", "2.6.0.0"
VALUE "FileVersion", "2.6.1.0"
VALUE "InternalName", "Piktomir"
VALUE "LegalCopyright", "Copyright ИнфоМир 2019"
VALUE "OriginalFilename", "Piktomir.exe"
VALUE "ProductName", "ПиктоМир"
VALUE "ProductVersion", "2.6.0.0"
VALUE "ProductVersion", "2.6.1.0"
END
END
BLOCK "VarFileInfo"
......
......@@ -236,6 +236,7 @@ gulp.task('publish', ['uglify-cocos', 'uglify-pm'], function() {
fs.copySync('./res', resPath);
fs.copySync('./ga.js', publishDir + 'ga.js');
fs.copySync('./manifest.webapp', publishDir+ 'manifest.webapp');
fs.copySync('./loginVK.html', publishDir+ 'loginVK.html');
gulp.src(path.join(resPath,'/**/*.png'))
.pipe(imagemin());
......@@ -288,4 +289,4 @@ gulp.task('watch', function() {
//gulp.watch('./assets/images/**/*', ['images']);
//gulp.watch('./assets/javascripts/**/*', ['javascripts']);
gulp.watch('./srcTS/**/*.ts', ['typescript']);
});
\ No newline at end of file
});
......@@ -80,7 +80,6 @@
</style>
</head>
<body>
<script src="//vk.com/js/api/openapi.js" type="text/javascript"></script>
<script src="res/loading.js"></script>
<canvas id="gameCanvas" width="480" height="720"></canvas>
<script src="frameworks/cocos2d-html5/CCBoot.js"></script>
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Login VK</title>
</head>
<script>
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split('&');
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split('=');
if (decodeURIComponent(pair[0]) === variable) {
return decodeURIComponent(pair[1]);
}
}
console.log('Query variable %s not found', variable);
}
window.onload = function() {
var accessToken = getQueryVariable('access_token');
var refreshToken = getQueryVariable('refresh_token');
if(accessToken && refreshToken)
{
window.opener.postMessage({
accessToken: accessToken,
refreshToken: refreshToken
}, window.location.origin);
// window.document.write('<div id="access_token">' + accessToken + '</div><div id="refresh_token">' + refreshToken + '</div>');
}
else
{
window.opener.postMessage("Error auth from vk", window.location.origin);
}
window.close();
};
</script>
<body>
</body>
</html>
......@@ -90,7 +90,7 @@ cc.game.onStart = function()
var density = cc.Device.getDPI()/pm.MOBILE_DPI_FACTOR;
if (density < 2)
if (density <= 2)
density = 2.0 / density;
else
density *= 2.0;
......@@ -119,7 +119,7 @@ cc.game.onStart = function()
var density = cc.Device.getDPI()/pm.MOBILE_DPI_FACTOR;
if (density < 2)
if (density <= 2)
density = 2.0 / density;
else
density *= 2.0;
......
This diff is collapsed.
......@@ -178,6 +178,8 @@
"src/Train Level/TrainObjectSprite.js",
"src/Train Level/TrainCar.js",
"src/Train Level/TrainCarSprite.js",
"src/Train Level/TrainBarrel.js",
"src/Train Level/TrainBarrelSprite.js",
"src/Train Level/TrainLevelModule.js",
"src/Train Level/TrainMapEditorLayer.js",
"src/Train Level/TrainRobotSettingsLayer.js",
......@@ -238,7 +240,7 @@
"src/Layers/Menu Layers/InfoMarketLayer.js",
"src/Layers/Menu Layers/CommonSettingsLayer.js",
"src/Layers/Level Layers/LevelMenu/ChangeLevelMenu.js",
"src/Layers/Level Layers/LevelMenu/FailStateInformLayer.js",
"src/Layers/Level Layers/LevelMenu/StateInformLayer.js",
"src/Layers/Level Layers/LevelMenu/LevelMenuLayer.js",
"src/Layers/Level Layers/LevelMenu/ChangeLevelMenu.js",
"src/Layers/Level Layers/LevelMenu/SelectMapMenu.js",
......@@ -260,6 +262,8 @@
"src/Layers/Level Layers/Function Buttons/MethodListButton.js",
"src/Layers/Level Layers/Function Buttons/RecognizeResultButton.js",
"src/Layers/Level Layers/Function Buttons/EmptyFunctionButton.js",
"src/Layers/Level Layers/Function Buttons/RepeaterButton.js",
"src/Layers/Level Layers/Function Buttons/CounterRepeaterButton.js",
"src/Layers/Level Layers/FunctionButtonBar.js",
"src/Layers/Level Layers/SelectBlockTypeLayer.js",
"src/Layers/Level Layers/ProgramContainerLayer.js",
......
......@@ -180,17 +180,17 @@
<key>wall-left-top.png</key>
<dict>
<key>spriteSize</key>
<string>{14.0,128.0}</string>
<string>{22.0,128.0}</string>
<key>spriteOffset</key>
<string>{0.0,0.0}</string>
<key>spriteSourceSize</key>
<string>{14.0,128.0}</string>
<string>{22.0,128.0}</string>
<key>spriteSourceColorRect</key>
<string>{{0.0,0.0},{14.0,128.0}}</string>
<string>{{0.0,0.0},{22.0,128.0}}</string>
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{306.0,306.0},{14.0,128.0}}</string>
<string>{{306.0,306.0},{22.0,128.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
......@@ -210,7 +210,7 @@
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{338.0,306.0},{42.0,155.0}}</string>
<string>{{346.0,306.0},{42.0,155.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
......@@ -220,17 +220,17 @@
<key>wall-up-top.png</key>
<dict>
<key>spriteSize</key>
<string>{128.0,14.0}</string>
<string>{128.0,22.0}</string>
<key>spriteOffset</key>
<string>{0.0,0.0}</string>
<key>spriteSourceSize</key>
<string>{128.0,14.0}</string>
<string>{128.0,22.0}</string>
<key>spriteSourceColorRect</key>
<string>{{0.0,0.0},{128.0,14.0}}</string>
<string>{{0.0,0.0},{128.0,22.0}}</string>
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{14.0,479.0},{128.0,14.0}}</string>
<string>{{14.0,479.0},{128.0,22.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
......
......@@ -180,17 +180,17 @@
<key>wall-left-top.png</key>
<dict>
<key>spriteSize</key>
<string>{14.0,128.0}</string>
<string>{22.0,128.0}</string>
<key>spriteOffset</key>
<string>{0.0,0.0}</string>
<key>spriteSourceSize</key>
<string>{14.0,128.0}</string>
<string>{22.0,128.0}</string>
<key>spriteSourceColorRect</key>
<string>{{0.0,0.0},{14.0,128.0}}</string>
<string>{{0.0,0.0},{22.0,128.0}}</string>
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{306.0,306.0},{14.0,128.0}}</string>
<string>{{306.0,306.0},{22.0,128.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
......@@ -210,7 +210,7 @@
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{338.0,306.0},{42.0,156.0}}</string>
<string>{{346.0,306.0},{42.0,156.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
......@@ -220,17 +220,17 @@
<key>wall-up-top.png</key>
<dict>
<key>spriteSize</key>
<string>{128.0,14.0}</string>
<string>{128.0,22.0}</string>
<key>spriteOffset</key>
<string>{0.0,0.0}</string>
<key>spriteSourceSize</key>
<string>{128.0,14.0}</string>
<string>{128.0,22.0}</string>
<key>spriteSourceColorRect</key>
<string>{{0.0,0.0},{128.0,14.0}}</string>
<string>{{0.0,0.0},{128.0,22.0}}</string>
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{14.0,480.0},{128.0,14.0}}</string>
<string>{{14.0,480.0},{128.0,22.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
......
......@@ -9,7 +9,7 @@
<key>format</key>
<integer>3</integer>
<key>size</key>
<string>{252.0,84.0}</string>
<string>{84.0,336.0}</string>
<key>name</key>
<string>counter-repeaters</string>
<key>textureFileName</key>
......@@ -50,7 +50,7 @@
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{85.0,1.0},{80.0,80.0}}</string>
<string>{{1.0,85.0},{80.0,80.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
......@@ -70,7 +70,27 @@
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{169.0,1.0},{80.0,80.0}}</string>
<string>{{1.0,169.0},{80.0,80.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
<array>
</array>
</dict>
<key>rep-cnt_value_1-normal.png</key>
<dict>
<key>spriteSize</key>
<string>{80.0,80.0}</string>
<key>spriteOffset</key>
<string>{0.0,0.0}</string>
<key>spriteSourceSize</key>
<string>{80.0,80.0}</string>
<key>spriteSourceColorRect</key>
<string>{{0.0,0.0},{80.0,80.0}}</string>
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{1.0,253.0},{80.0,80.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
......
res/Picts-hd/System/PL_Border.png

59.8 KB | W: | H:

res/Picts-hd/System/PL_Border.png

40.8 KB | W: | H:

res/Picts-hd/System/PL_Border.png
res/Picts-hd/System/PL_Border.png
res/Picts-hd/System/PL_Border.png
res/Picts-hd/System/PL_Border.png
  • 2-up
  • Swipe
  • Onion skin
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -180,17 +180,17 @@
<key>wall-left-top.png</key>
<dict>
<key>spriteSize</key>
<string>{7.0,64.0}</string>
<string>{11.0,64.0}</string>
<key>spriteOffset</key>
<string>{0.0,0.0}</string>
<key>spriteSourceSize</key>
<string>{7.0,64.0}</string>
<string>{11.0,64.0}</string>
<key>spriteSourceColorRect</key>
<string>{{0.0,0.0},{7.0,64.0}}</string>
<string>{{0.0,0.0},{11.0,64.0}}</string>
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{153.0,153.0},{7.0,64.0}}</string>
<string>{{153.0,153.0},{11.0,64.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
......@@ -210,7 +210,7 @@
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{169.0,153.0},{21.0,77.0}}</string>
<string>{{173.0,153.0},{21.0,77.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
......@@ -220,17 +220,17 @@
<key>wall-up-top.png</key>
<dict>
<key>spriteSize</key>
<string>{64.0,7.0}</string>
<string>{64.0,11.0}</string>
<key>spriteOffset</key>
<string>{0.0,0.0}</string>
<key>spriteSourceSize</key>
<string>{64.0,7.0}</string>
<string>{64.0,11.0}</string>
<key>spriteSourceColorRect</key>
<string>{{0.0,0.0},{64.0,7.0}}</string>
<string>{{0.0,0.0},{64.0,11.0}}</string>
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{7.0,239.0},{64.0,7.0}}</string>
<string>{{7.0,239.0},{64.0,11.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
......
......@@ -180,17 +180,17 @@
<key>wall-left-top.png</key>
<dict>
<key>spriteSize</key>
<string>{7.0,64.0}</string>
<string>{11.0,64.0}</string>
<key>spriteOffset</key>
<string>{0.0,0.0}</string>
<key>spriteSourceSize</key>
<string>{7.0,64.0}</string>
<string>{11.0,64.0}</string>
<key>spriteSourceColorRect</key>
<string>{{0.0,0.0},{7.0,64.0}}</string>
<string>{{0.0,0.0},{11.0,64.0}}</string>
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{153.0,153.0},{7.0,64.0}}</string>
<string>{{153.0,153.0},{11.0,64.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
......@@ -210,7 +210,7 @@
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{169.0,153.0},{21.0,78.0}}</string>
<string>{{173.0,153.0},{21.0,78.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
......@@ -220,17 +220,17 @@
<key>wall-up-top.png</key>
<dict>
<key>spriteSize</key>
<string>{64.0,7.0}</string>
<string>{64.0,11.0}</string>
<key>spriteOffset</key>
<string>{0.0,0.0}</string>
<key>spriteSourceSize</key>
<string>{64.0,7.0}</string>
<string>{64.0,11.0}</string>
<key>spriteSourceColorRect</key>
<string>{{0.0,0.0},{64.0,7.0}}</string>
<string>{{0.0,0.0},{64.0,11.0}}</string>
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{7.0,240.0},{64.0,7.0}}</string>
<string>{{7.0,240.0},{64.0,11.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
......
This diff is collapsed.
......@@ -9,7 +9,7 @@
<key>format</key>
<integer>3</integer>
<key>size</key>
<string>{126.0,42.0}</string>
<string>{42.0,168.0}</string>
<key>name</key>
<string>counter-repeaters</string>
<key>textureFileName</key>
......@@ -50,7 +50,7 @@
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{42.0,0.0},{40.0,40.0}}</string>
<string>{{0.0,42.0},{40.0,40.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
......@@ -70,7 +70,27 @@
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{84.0,0.0},{40.0,40.0}}</string>
<string>{{0.0,84.0},{40.0,40.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
<array>
</array>
</dict>
<key>rep-cnt_value_1-normal.png</key>
<dict>
<key>spriteSize</key>
<string>{40.0,40.0}</string>
<key>spriteOffset</key>
<string>{0.0,0.0}</string>
<key>spriteSourceSize</key>
<string>{40.0,40.0}</string>
<key>spriteSourceColorRect</key>
<string>{{0.0,0.0},{40.0,40.0}}</string>
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
<string>{{0.0,126.0},{40.0,40.0}}</string>
<key>textureRotated</key>
<false/>
<key>aliases</key>
......
res/Picts/System/PL_Border.png

4.02 KB | W: | H:

res/Picts/System/PL_Border.png

17.6 KB | W: | H:

res/Picts/System/PL_Border.png
res/Picts/System/PL_Border.png
res/Picts/System/PL_Border.png
res/Picts/System/PL_Border.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
res/Picts/WorldPics/galaxy0.png

220 KB | W: | H:

res/Picts/WorldPics/galaxy0.png

231 KB | W: | H:

res/Picts/WorldPics/galaxy0.png
res/Picts/WorldPics/galaxy0.png
res/Picts/WorldPics/galaxy0.png
res/Picts/WorldPics/galaxy0.png
  • 2-up
  • Swipe
  • Onion skin
res/Picts/WorldPics/galaxy1.png

159 KB | W: | H:

res/Picts/WorldPics/galaxy1.png

208 KB | W: | H:

res/Picts/WorldPics/galaxy1.png
res/Picts/WorldPics/galaxy1.png
res/Picts/WorldPics/galaxy1.png
res/Picts/WorldPics/galaxy1.png
  • 2-up
  • Swipe
  • Onion skin
res/Picts/WorldPics/galaxy2.png

235 KB | W: | H:

res/Picts/WorldPics/galaxy2.png

163 KB | W: | H:

res/Picts/WorldPics/galaxy2.png
res/Picts/WorldPics/galaxy2.png
res/Picts/WorldPics/galaxy2.png
res/Picts/WorldPics/galaxy2.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -195,8 +195,9 @@
"NetTaskFailed": "Task failed",
"NetDevelopProgram": "Program develop",
"NetTeamDeleted": "Team Deleted",
"AutoChange": "Change Automatically",
"AutoChangeForAll": "Change Automatically for all",
"NetReadyToChange": "Сhange level",
"AutoChange": "Autochange",
"AutoChangeForAll": "Autochange all",
"SHOP": "SHOP",
"ABOUT": "ABOUT",
"RATING": "RATING",
......@@ -256,5 +257,10 @@
"IAgree": "I agree with ",
"UserAgreement": "User Agreement",
"And": "и ",
"PrivacyPolicy": "Privacy Policy"
"PrivacyPolicy": "Privacy Policy",
"Time": "Time",
"Hours": "h.",
"Minutes": "m.",
"Seconds": "s.",
"NoCompleted" : "No task completed"
}
......@@ -197,8 +197,9 @@
"NetTaskFailed": "Задание провалено",
"NetDevelopProgram": "Разработка программы",
"NetTeamDeleted": "Команда удалена",
"AutoChange": "Переключать автоматически",
"AutoChangeForAll": "Переключать автоматически всем",
"NetReadyToChange": "Переключить уровень",
"AutoChange": "Автопереключение",
"AutoChangeForAll": "Автопереключение всем",
"SHOP": "МАГАЗИН",
"ABOUT": "ОБ ИГРЕ",
"RATING": "РЕЙТИНГ",
......@@ -258,5 +259,10 @@
"IAgree": "Я принимаю условия ",
"UserAgreement": "Пользовательского соглашения",
"And": "и ",
"PrivacyPolicy": "Политики конфиденциальности"
"PrivacyPolicy": "Политики конфиденциальности",
"Time": "Время",
"Hours": "ч.",
"Minutes": "м.",
"Seconds": "с.",
"NoCompleted" : "Ничего не выполнено"
}
This diff is collapsed.
This diff is collapsed.
......@@ -95,9 +95,7 @@ var Map2D = pm.AbstractMap.extend(/** @lends Map2D#*/{
var startForRobot = this.element(cc.p(x, y)).startForRobot;
if (startForRobot !== pm.MapElement.START_FOR_NO_ROBOT)
level.robots[startForRobot].setPosition(cc.p(x, y), this.element(cc.p(x, y)).startRobotData.direction);
}
}
......
......@@ -371,6 +371,9 @@ pm.MapLayer2D = pm.MapLayer.extend(/** @lends pm.MapLayer2D# */{
handleTouch: function(touch)
{
if (!this._clicksEnabled)
return false;
var level = this._map.parentLevel;
var handles = false;
......@@ -504,7 +507,7 @@ pm.MapLayer2D = pm.MapLayer.extend(/** @lends pm.MapLayer2D# */{
{
var object = this._map.objects[i];
object.generateSprite();
object.generateSprite(this._previewDraw);
if (!(object.sprite instanceof pm.ObjectSprite2D))
continue;
......
......@@ -28,6 +28,19 @@ pm.PlayerRobot2D = pm.PlayerRobot.extend(/** @lends pm.PlayerRobot2D#*/{
this.nativeFunctionMap[pm.CMD_INDICATE] = new pm.NativeFunction(this, this._indicate, pm.CMD_INDICATE);
},
/**
* Checks condition for this robot.
* @param {String} condition
* @param {*} [args] Additional arguments of checking condition.
* @returns {Boolean}
*/
checkCondition: function(condition, args)
{
this.playAnimation(RobotAnimation2D.Indicate, this._endIndicate, this.direction);
return pm.AbstractRobot.prototype.checkCondition.call(this, condition, args);
},
getDirectionCount: function() {},
_removeFromOldPosition: function()
......@@ -160,9 +173,7 @@ pm.PlayerRobot2D = pm.PlayerRobot.extend(/** @lends pm.PlayerRobot2D#*/{
map.element(this.position).addRobot(this);
if(!this.isBroken())
this.playAnimation(RobotAnimation2D.Move, this._endMove, this.position);
}
else if(!this.isBroken())
{
......
......@@ -67,9 +67,12 @@ pm.RobotSprite2D = pm.DynamicSprite.extend(/** @lends pm.RobotSprite2D#*/{
this._commandsCount = new ccui.Text("", pm.settings.fontBoldName, pm.settings.fontSize);
this._commandsCount.setColor(cc.color(1, 1, 180));
this._commandsCount.setAnchorPoint(cc.p(0.5, 0.5));
this._commandsCount.setPosition(this._commandsSprite.width/2, this._commandsSprite.height/2);
if (cc.sys.isNative)
this._commandsCount.setNormalizedPosition(cc.p(0.5, 0.5));
else
this._commandsCount.setNormalizedPosition(cc.p(0.5, 0.42));
this._commandsSprite.addChild(this._commandsCount);
},
......@@ -152,6 +155,12 @@ pm.RobotSprite2D = pm.DynamicSprite.extend(/** @lends pm.RobotSprite2D#*/{
this.getSprite().runAction(cc.sequence(moveRobot, moveEnd, callback));
},
_transport: function(target)
{
var pos = this.getRealPosition(target);
this.getSprite().setPosition(pos.x, pos.y);
},
_destroy: function(direction, endCallback, target)
{
var animation = cc.animationCache.getAnimation(this._getDestroyAnimationName(direction));
......
......@@ -13,11 +13,14 @@ Array.prototype.deserialize = function(sourceArray)
}
else if (sourceArray[i] && cc.isObject(sourceArray[i]))
{
try {
var o = new pm.classMapping[sourceArray[i].typeName]();
var o = new pm.classMapping[sourceArray[i].typeName]();
o.deserialize(sourceArray[i]);
o.deserialize(sourceArray[i]);
}
catch(exception){
console.log(exception);
}
this.push(o);
}
else { this.push(sourceArray[i]); }
......
......@@ -65,12 +65,21 @@ pm.HIGHLIGHT_METHOD_EVENT_STR = "highlight_method";
*/
pm.HIGHLIGHT_CONDITION_EVENT_STR = "highlight_condition";
/**
* Constant for a highlight points in repeater button of {@link ProgramLayer} event by {@link pm.RobotManager}
* @const
* @default
* @type {String}
*/
pm.HIGHLIGHT_POINT_IN_REP_EVENT = "highlight_rep";
/**
* Constant for a remove highlight method button of {@link ProgramLayer} event by {@link pm.RobotManager}
* @const
* @default
* @type {String}
*/
pm.REM_LAST_HIGHLIGHT_EVENT_STR = "rem_block_highlight";
/**
......@@ -140,6 +149,8 @@ pm.LAYER_ZOOM_IN_EVENT = "layer_zoom_in_event";
pm.LAYER_ZOOM_OUT_EVENT = "layer_zoom_out_event";
pm.ANIMATE_HIDE_BUTTON = "animate_hide_button";
pm.ANIMATE_RESTART_BUTTON = "animate_restart_button";
/**
* Constant for stop program.
* @const
......@@ -213,6 +224,8 @@ pm.DISABLE_CONTROLLED_MODE_STR = "disable_controlled_mode";
*/
pm.USER_PROGRAM_UPDATED_STR = "user_program_updated";
pm.READY_TO_CHANGE_LEVEL_STR = "ready_to_change_level";
/**
* Constant for changing state of global robot
* @const
......
......@@ -7,7 +7,7 @@
* @default
* @type {string}
*/
var version = "2.6.0";
var version = "2.6.1";
/**
* @const
* @default
......
......@@ -266,6 +266,13 @@ pm.data.World = pm.Class.extend(/** @lends pm.data.World# */{
this._editLog.setLevelDeleted(this.games[game].levels[level].id);
this.games[game].levels.splice(level, 1);
for(var i = level; i < this.games[game].levels.length; ++i)
{
--this.games[game].levels[i].order;
this.setLevelReordered(game, i);
}
this.save();
},
......@@ -352,6 +359,12 @@ pm.data.World = pm.Class.extend(/** @lends pm.data.World# */{
this.games.splice(game, 1);
for(var i = game; i < this.games.length; ++i)
{
--this.games[i].order;
this._editLog.setGameReordered(this.games[i].id);
}
this.save();
},
......
......@@ -57,6 +57,10 @@ var WorldList = cc.Class.extend(/** @lends WorldList# */{
if (pm.settings.userLoggedIn)
{
tasks.push({
apiCall: pm.apiServerUtils.getSharedWorlds,
type: WorldList.WORLD_TYPE.SHARED
});
tasks.push({
apiCall: pm.apiServerUtils.getGrantedWorlds,
type: WorldList.WORLD_TYPE.GRANTED
......
......@@ -15,6 +15,8 @@ pm.MapLayer = cc.Layer.extend(/** @lends pm.MapLayer# */{
_enabled: true,
_clicksEnabled: true,
ctor: function(map)
{
this._super();
......@@ -36,6 +38,11 @@ pm.MapLayer = cc.Layer.extend(/** @lends pm.MapLayer# */{
return this._enabled;
},
enableClicks: function(flag)
{
this._clicksEnabled = flag;
},
/**
* Adds Terrain Object to the map
* @param {Object} child
......
......@@ -32,11 +32,6 @@ pm.MapsContainerLayer = ccui.Layout.extend(/** @lends pm.MapsContainerLayer# */{
/**
* @private
* @type {Boolean}
*/
_enabled: true,
/**
* @private
* @type {Boolean}
*/
_canScrollLayers: true,
/**
......@@ -380,7 +375,7 @@ pm.MapsContainerLayer = ccui.Layout.extend(/** @lends pm.MapsContainerLayer# */{
_touchBegan: function(touches, pEvent)
{
if(!this._enabled)
if(!this.enabled)
return;
var activeMapLayer = this._level.activeMap.mapLayer;
......@@ -421,7 +416,7 @@ pm.MapsContainerLayer = ccui.Layout.extend(/** @lends pm.MapsContainerLayer# */{
_touchMoved: function(touches, pEvent)
{
if(!this._enabled)
if(!this.enabled)
return;
if (this._touchCount === 1 && touches.length === 2)
......
......@@ -50,6 +50,8 @@ pm.Object = pm.Class.extend(/** @lends pm.Object# */{
_isPlayingAnimation: false,
visualId: 0,
ctor: function()
{
this._addNonEnumerableProps("sprite", "position", "parentMap", "_isPlayingAnimation");
......@@ -119,9 +121,11 @@ pm.Object = pm.Class.extend(/** @lends pm.Object# */{
* @name pm.Object#generateSprite
* @returns {pm.ObjectSprite}
*/
generateSprite: function() {},
generateSprite: function(previewDraw) {},
getState: function () {},
setState: function (state) {}
setState: function (state) {},
updateNumberSprite: function(){}
});
......@@ -154,7 +154,11 @@ pm.AbstractRobot = pm.Class.extend( /** @lends pm.AbstractRobot# */{
return true;
else
{
return pm.settings.isEditorMode || pos !== null && this.parentLevel.programData[this.groupID].symbols[pos.x][pos.y].value === "empty";
return this.parentLevel.programData[this.groupID].symbols[pos.x][pos.y].type === pm.SymbolType.Function
|| this.parentLevel.programData[this.groupID].symbols[pos.x][pos.y].type === pm.SymbolType.Repeater
|| pm.settings.isEditorMode
|| pos !== null
&& this.parentLevel.programData[this.groupID].symbols[pos.x][pos.y].value === "empty";
}
},
......
......@@ -49,6 +49,8 @@ pm.PlayerRobot = pm.AbstractRobot.extend(/** @lends pm.PlayerRobot#*/{
if(!CORE_BUILD && (!pm.settings.isAnimationDisabled() || forced))
this.sprite.playAnimation(animationCallback, this, animation, args);
else if(CORE_BUILD)
animationCallback.call(this);
else if(animationCallback)
setTimeout(animationCallback.bind(this), 0);
},
......
......@@ -428,66 +428,58 @@ pm.programUtils = {
_compileRepeaterBlock: function(program, currentBlock, robot)
{
var blockLength = 0;
var useRepeater = currentBlock.value !== pm.REPEATER_EMPTY && currentBlock.value !== 1;
var repInstr;
var loopBodyStartLabel = "";
var blockEndLabel = "";
if (useRepeater)
{
loopBodyStartLabel = this._getLabel();
blockEndLabel = this._getLabel();
loopBodyStartLabel = this._getLabel();
blockEndLabel = this._getLabel();
repInstr = new pm.Instruction(pm.Instruction.START_LOOP);
if(!cc.isNumber(currentBlock.value))
{
var repeaterRobot = this._searchRobotForRepeater(robot, currentBlock.value);
repInstr = new pm.Instruction(pm.Instruction.START_LOOP);
if (!repeaterRobot)
{
repeaterRobot = this._searchGlobalRobotForRepeater(currentBlock.value);
repInstr.data.repArgs = robot.id;
}
if(!cc.isNumber(currentBlock.value))
{
var repeaterRobot = this._searchRobotForRepeater(robot, currentBlock.value);
repInstr.data.robot = repeaterRobot;
if (!repeaterRobot)
{
repeaterRobot = this._searchGlobalRobotForRepeater(currentBlock.value);
repInstr.data.repArgs = robot.id;
}
repInstr.data.repeater = currentBlock.value;
repInstr.data.blockEndLabel = blockEndLabel;
repInstr.data.iteratorTag = pm.variableList.addVariable(false);
program.instructions.push(repInstr);
program.labels[loopBodyStartLabel] = program.instructions.length;
repInstr.data.robot = repeaterRobot;
}
for (var i = 0; i < currentBlock.children.length; ++i)
repInstr.data.repeater = currentBlock.value;
repInstr.data.blockEndLabel = blockEndLabel;
repInstr.data.iteratorTag = pm.variableList.addVariable(false);
repInstr.data.repPlace = cc.p(currentBlock.leftUp.x , currentBlock.leftUp.y - 1);
program.instructions.push(repInstr);
program.labels[loopBodyStartLabel] = program.instructions.length;
for (var i = 0; i < currentBlock.children.length; ++i)
blockLength += this._compileBlock(program, currentBlock.children[i], robot);
if (useRepeater)
{
var endInstr = new pm.Instruction(pm.Instruction.END_LOOP);
var endInstr = new pm.Instruction(pm.Instruction.END_LOOP);
endInstr.data.repeater = currentBlock.value;
endInstr.data.repeater = currentBlock.value;
if(repInstr.data.robot)
endInstr.data.robot = repInstr.data.robot;
if(repInstr.data.robot)
endInstr.data.robot = repInstr.data.robot;