Deploying to pages from @ thepaperpilot/thepaperpilot.github.io@91ffe25fd6 🚀
This commit is contained in:
parent
4de3b9bf94
commit
bb365c434a
879 changed files with 55528 additions and 0 deletions
kronos/js/Demo
49
kronos/js/Demo/demoTree.js
Normal file
49
kronos/js/Demo/demoTree.js
Normal file
|
@ -0,0 +1,49 @@
|
|||
// treeLayout will override the default tree's layout if used
|
||||
var layoutInfo = {
|
||||
startTab: "c",
|
||||
showTree: true,
|
||||
|
||||
//treeLayout: ""
|
||||
|
||||
|
||||
}
|
||||
|
||||
// A "ghost" layer which offsets f in the tree
|
||||
addNode("spook", {
|
||||
row: 1,
|
||||
layerShown: "ghost",
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
// A "ghost" layer which offsets f in the tree
|
||||
addNode("g", {
|
||||
symbol: "TH",
|
||||
branches: ["c"],
|
||||
color: '#6d3678',
|
||||
layerShown: true,
|
||||
canClick() {return player.points.gte(10)},
|
||||
tooltip: "Thanos your points",
|
||||
tooltipLocked: "Thanos your points",
|
||||
onClick() {player.points = player.points.div(2)
|
||||
console.log(this.layer)}
|
||||
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
// A "ghost" layer which offsets f in the tree
|
||||
addNode("h", {
|
||||
branches: ["g"],
|
||||
layerShown: true,
|
||||
tooltip() {return "Restore your points to " + player.c.otherThingy},
|
||||
tooltipLocked() {return "Restore your points to " + player.c.otherThingy},
|
||||
row: "side",
|
||||
canClick() {return player.points.lt(player.c.otherThingy)},
|
||||
onClick() {player.points = new Decimal(player.c.otherThingy)}
|
||||
},
|
||||
)
|
||||
|
||||
addLayer("tree-tab", {
|
||||
tabFormat: [["tree", function() {return (layoutInfo.treeLayout ? layoutInfo.treeLayout : TREE_LAYERS)}]]
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue