mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 14:18:24 +02:00
add blocky
This commit is contained in:
parent
6bc745ee01
commit
5211b6ad77
2 changed files with 22 additions and 13 deletions
|
@ -42,33 +42,33 @@ var BLOCK_NATURAL = {
|
||||||
};
|
};
|
||||||
|
|
||||||
var blocks = [
|
var blocks = [
|
||||||
BLOCK_RED, BLOCK_BLUE, BLOCK_YELLOW, BLOCK_GREEN, BLOCK_SMALL_CUBE
|
BLOCK_RED, BLOCK_BLUE, BLOCK_YELLOW, BLOCK_GREEN, BLOCK_NATURAL
|
||||||
];
|
];
|
||||||
|
|
||||||
var arrangements = [{
|
var arrangements = [{
|
||||||
name: 'tall',
|
name: 'tall',
|
||||||
blocks: [BLOCK_GREEN, BLOCK_GREEN, BLOCK_GREEN, ],
|
blocks: [BLOCK_GREEN, BLOCK_GREEN, BLOCK_GREEN],
|
||||||
target: Script.resolvePath("arrangement1.json")
|
target: "atp:/blocky/arrangement1A.json"
|
||||||
}, {
|
}, {
|
||||||
name: 'ostrich',
|
name: 'ostrich',
|
||||||
blocks: [BLOCK_RED, BLOCK_RED, BLOCK_GREEN, BLOCK_YELLOW, BLOCK_NATURAL],
|
blocks: [BLOCK_RED, BLOCK_RED, BLOCK_GREEN, BLOCK_YELLOW, BLOCK_NATURAL],
|
||||||
target: Script.resolvePath("arrangement2.json")
|
target: "atp:/blocky/arrangement2A.json"
|
||||||
}, {
|
}, {
|
||||||
name: 'froglog',
|
name: 'froglog',
|
||||||
blocks: [BLOCK_GREEN, BLOCK_GREEN, BLOCK_GREEN, BLOCK_NATURAL, BLOCK_NATURAL, BLOCK_NATURAL, BLOCK_NATURAL, BLOCK_NATURAL, BLOCK_NATURAL],
|
blocks: [BLOCK_GREEN, BLOCK_GREEN, BLOCK_GREEN, BLOCK_NATURAL, BLOCK_NATURAL, BLOCK_NATURAL, BLOCK_NATURAL, BLOCK_NATURAL, BLOCK_NATURAL],
|
||||||
target: Script.resolvePath("arrangement3.json")
|
target: "atp:/blocky/arrangement3A.json"
|
||||||
}, {
|
}, {
|
||||||
name: 'allOneLeg',
|
name: 'allOneLeg',
|
||||||
blocks: [BLOCK_RED, BLOCK_GREEN, BLOCK_YELLOW, BLOCK_BLUE, BLOCK_BLUE, BLOCK_NATURAL],
|
blocks: [BLOCK_RED, BLOCK_GREEN, BLOCK_YELLOW, BLOCK_BLUE, BLOCK_BLUE, BLOCK_NATURAL],
|
||||||
target: Script.resolvePath("arrangement4.json")
|
target: "atp:/blocky/arrangement4A.json"
|
||||||
}, {
|
}, {
|
||||||
name: 'threeppl',
|
name: 'threeppl',
|
||||||
blocks: [BLOCK_BLUE BLOCK_YELLOW, BLOCK_BLUE, BLOCK_NATURAL, BLOCK_NATURAL, BLOCK_NATURAL],
|
blocks: [BLOCK_BLUE, BLOCK_YELLOW, BLOCK_BLUE, BLOCK_NATURAL, BLOCK_NATURAL, BLOCK_NATURAL],
|
||||||
target: Script.resolvePath("arrangement5.json")
|
target: "atp:/blocky/arrangement5B.json"
|
||||||
}, {
|
}, {
|
||||||
name: 'dominoes',
|
name: 'dominoes',
|
||||||
blocks: [BLOCK_RED, BLOCK_YELLOW, BLOCK_YELLOW, BLOCK_YELLOW, BLOCK_YELLOW, BLOCK_YELLOW, BLOCK_YELLOW],
|
blocks: [BLOCK_RED, BLOCK_YELLOW, BLOCK_YELLOW, BLOCK_YELLOW, BLOCK_YELLOW, BLOCK_YELLOW, BLOCK_YELLOW],
|
||||||
target: Script.resolvePath("arrangement6.json")
|
target: "atp:/blocky/arrangement6B.json"
|
||||||
}]
|
}]
|
||||||
|
|
||||||
var PLAYABLE_BLOCKS_POSITION = {
|
var PLAYABLE_BLOCKS_POSITION = {
|
||||||
|
@ -115,8 +115,9 @@ var TARGET_BLOCKS_POSITION = {
|
||||||
print('BLOCKY TARGET BLOCKS:: ' + this.targetBlocks);
|
print('BLOCKY TARGET BLOCKS:: ' + this.targetBlocks);
|
||||||
},
|
},
|
||||||
createPlayableBlocks: function(arrangement) {
|
createPlayableBlocks: function(arrangement) {
|
||||||
print('BLOCKY creating playable blocks');
|
print('BLOCKY creating playable blocks' + arrangement.blocks.length);
|
||||||
arrangement.blocks.forEach(function(block) {
|
arrangement.blocks.forEach(function(block) {
|
||||||
|
print('BLOCKY in a block loop')
|
||||||
var blockProps = {
|
var blockProps = {
|
||||||
name: "home_model_blocky_block",
|
name: "home_model_blocky_block",
|
||||||
type: 'Model',
|
type: 'Model',
|
||||||
|
@ -145,9 +146,13 @@ var TARGET_BLOCKS_POSITION = {
|
||||||
},
|
},
|
||||||
position: PLAYABLE_BLOCKS_POSITION
|
position: PLAYABLE_BLOCKS_POSITION
|
||||||
}
|
}
|
||||||
this.playableBlocks.push(Entities.addEntity(blockProps));
|
var newBlock = Entities.addEntity(blockProps);
|
||||||
|
print('BLOCKY made a playable block' + newBlock)
|
||||||
|
_this.playableBlocks.push(newBlock);
|
||||||
|
print('BLOCKY pushing it into playable blocks');
|
||||||
})
|
})
|
||||||
|
|
||||||
|
print('BLOCKY after going through playable arrangement')
|
||||||
},
|
},
|
||||||
startNearTrigger: function() {
|
startNearTrigger: function() {
|
||||||
print('BLOCKY got a near trigger');
|
print('BLOCKY got a near trigger');
|
||||||
|
|
|
@ -43,6 +43,8 @@
|
||||||
|
|
||||||
var transformerPath = Script.resolvePath("atp:/dressingRoom/wrapper.js");
|
var transformerPath = Script.resolvePath("atp:/dressingRoom/wrapper.js");
|
||||||
|
|
||||||
|
var blockyPath = Script.resolvePath("atp:/blocky/wrapper.js");
|
||||||
|
|
||||||
Script.include(utilsPath);
|
Script.include(utilsPath);
|
||||||
|
|
||||||
Script.include(kineticPath);
|
Script.include(kineticPath);
|
||||||
|
@ -53,6 +55,7 @@
|
||||||
Script.include(cuckooClockPath);
|
Script.include(cuckooClockPath);
|
||||||
Script.include(pingPongGunPath);
|
Script.include(pingPongGunPath);
|
||||||
Script.include(transformerPath);
|
Script.include(transformerPath);
|
||||||
|
Script.include(blockyPath);
|
||||||
|
|
||||||
var TRANSFORMER_URL_ROBOT = 'atp:/dressingRoom/simple_robot.fbx';
|
var TRANSFORMER_URL_ROBOT = 'atp:/dressingRoom/simple_robot.fbx';
|
||||||
|
|
||||||
|
@ -327,6 +330,7 @@
|
||||||
y: 179.0293,
|
y: 179.0293,
|
||||||
z: 89.9698
|
z: 89.9698
|
||||||
});
|
});
|
||||||
|
print('home before cuckooClock')
|
||||||
|
|
||||||
var cuckooClock = new MyCuckooClock({
|
var cuckooClock = new MyCuckooClock({
|
||||||
x: 1105.5237,
|
x: 1105.5237,
|
||||||
|
@ -337,7 +341,7 @@
|
||||||
y: -57.0089,
|
y: -57.0089,
|
||||||
z: -0.0013
|
z: -0.0013
|
||||||
});
|
});
|
||||||
|
print('home after cuckooClock')
|
||||||
var blocky = new BlockyGame({
|
var blocky = new BlockyGame({
|
||||||
x: 1098.27,
|
x: 1098.27,
|
||||||
y: 460.43,
|
y: 460.43,
|
||||||
|
|
Loading…
Reference in a new issue