/**** * Classes ****/ var FourthScreen = Container.expand(function () { var self = Container.call(this); var title = self.attachAsset('title', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1366 }); var titleText = new Text2('Like canva is the common man\'s tool against figma, upit can be the common man\'s tool against Unteal / Unity', { size: 150, fill: 0xFFFFFF, align: 'center' }); titleText.anchor.set(0.5, 0.5); titleText.x = title.x; titleText.y = title.y; self.addChild(titleText); var continueButton = new Text2('Continue', { size: 100, fill: 0xFFFFFF, align: 'center' }); continueButton.anchor.set(0.5, 0.5); continueButton.x = 1024; continueButton.y = 1600; self.addChild(continueButton); var restartButton = new Text2('Restart', { size: 100, fill: 0xFFFFFF, align: 'center' }); restartButton.anchor.set(0.5, 0.5); restartButton.x = 1024; restartButton.y = 1800; self.addChild(restartButton); var nextSlideButton = new Text2('Next Slide', { size: 100, fill: 0xFFFFFF, align: 'center' }); nextSlideButton.anchor.set(0.5, 0.5); nextSlideButton.x = 1024; nextSlideButton.y = 2000; self.addChild(nextSlideButton); continueButton.down = function () { // Logic to continue the presentation LK.showYouWin(); // Placeholder for actual continue logic }; restartButton.down = function () { // Logic to restart the presentation presentation.currentSlide = 0; presentation.updateSlide(); }; nextSlideButton.down = function () { // Logic to go to the next slide presentation.nextSlide(); }; }); var HomePage = Container.expand(function () { var self = Container.call(this); var title = self.attachAsset('title', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1366 }); var titleText = new Text2('Upit \n Repositioning', { size: 150, fill: 0xFFFFFF, align: 'center' }); titleText.anchor.set(0.5, 0.5); titleText.x = title.x; titleText.y = title.y; self.addChild(titleText); }); var LeftIcon = Container.expand(function () { var self = Container.call(this); var icon = self.attachAsset('leftIcon', { anchorX: 0.5, anchorY: 0.5, x: 100, y: 1366 }); }); var NextScreen = Container.expand(function () { var self = Container.call(this); var title = self.attachAsset('title', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1366 }); var titleText = new Text2('Upit is \n more than \n Just a Game Engine', { size: 150, fill: 0xFFFFFF, align: 'center' }); titleText.anchor.set(0.5, 0.5); titleText.x = title.x; titleText.y = title.y; self.addChild(titleText); }); var Presentation = Container.expand(function () { var self = Container.call(this); self.slides = []; self.currentSlide = 0; self.addSlide = function (slide) { self.slides.push(slide); }; self.nextSlide = function () { if (self.currentSlide < self.slides.length - 1) { self.currentSlide++; self.updateSlide(); } }; self.prevSlide = function () { if (self.currentSlide > 0) { self.currentSlide--; self.updateSlide(); } }; self.updateSlide = function () { // Update the displayed slide }; self.update = function () { // Update presentation content }; }); var RightIcon = Container.expand(function () { var self = Container.call(this); var icon = self.attachAsset('rightIcon', { anchorX: 0.5, anchorY: 0.5, x: 1948, y: 1366 }); }); var Slide = Container.expand(function () { var self = Container.call(this); self.update = function () { // Update slide content }; }); var ThirdScreen = Container.expand(function () { var self = Container.call(this); var title = self.attachAsset('title', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1366 }); var titleText = new Text2('Upit has \n enormous potential \n to disrupt the education \n sector worldwide', { size: 150, fill: 0xFFFFFF, align: 'center' }); titleText.anchor.set(0.5, 0.5); titleText.x = title.x; titleText.y = title.y; self.addChild(titleText); }); var ProgressText = Text2.expand(function () { var self = Text2.call(this, '', { size: 50, fill: 0xFFFFFF, align: 'center' }); self.anchor.set(0.5, 0.5); self.update = function () { self.setText('Screen ' + (presentation.currentSlide + 1) + ' of ' + presentation.slides.length); }; }); /**** * Initialize Game ****/ var game = new LK.Game({ title: "SlideDeck Pro", description: "An interactive presentation tool built with the LK game engine. Create dynamic slides with professional transitions, responsive layouts, and touch navigation. Engage your audience with interactive elements and animations for impactful meetings, pitches, or educational presentations.", backgroundColor: 0x000000 }); /**** * Game Code ****/ var homePage = game.addChild(new HomePage()); var nextScreen = game.addChild(new NextScreen()); var thirdScreen = game.addChild(new ThirdScreen()); nextScreen.visible = false; thirdScreen.visible = false; var fourthScreen = game.addChild(new FourthScreen()); fourthScreen.visible = false; var presentation = new Presentation(); var progressText = game.addChild(new ProgressText()); progressText.x = 1024; progressText.y = 50; var leftIcon = game.addChild(new LeftIcon()); var rightIcon = game.addChild(new RightIcon()); leftIcon.down = function () { if (nextScreen.visible) { nextScreen.visible = false; homePage.visible = true; } else if (thirdScreen.visible) { thirdScreen.visible = false; nextScreen.visible = true; } else if (fourthScreen.visible) { fourthScreen.visible = false; thirdScreen.visible = true; } }; rightIcon.down = function () { if (homePage.visible) { homePage.visible = false; nextScreen.visible = true; } else if (nextScreen.visible) { nextScreen.visible = false; thirdScreen.visible = true; } else if (thirdScreen.visible) { thirdScreen.visible = false; fourthScreen.visible = true; } };
/****
* Classes
****/
var FourthScreen = Container.expand(function () {
var self = Container.call(this);
var title = self.attachAsset('title', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 1366
});
var titleText = new Text2('Like canva is the common man\'s tool against figma, upit can be the common man\'s tool against Unteal / Unity', {
size: 150,
fill: 0xFFFFFF,
align: 'center'
});
titleText.anchor.set(0.5, 0.5);
titleText.x = title.x;
titleText.y = title.y;
self.addChild(titleText);
var continueButton = new Text2('Continue', {
size: 100,
fill: 0xFFFFFF,
align: 'center'
});
continueButton.anchor.set(0.5, 0.5);
continueButton.x = 1024;
continueButton.y = 1600;
self.addChild(continueButton);
var restartButton = new Text2('Restart', {
size: 100,
fill: 0xFFFFFF,
align: 'center'
});
restartButton.anchor.set(0.5, 0.5);
restartButton.x = 1024;
restartButton.y = 1800;
self.addChild(restartButton);
var nextSlideButton = new Text2('Next Slide', {
size: 100,
fill: 0xFFFFFF,
align: 'center'
});
nextSlideButton.anchor.set(0.5, 0.5);
nextSlideButton.x = 1024;
nextSlideButton.y = 2000;
self.addChild(nextSlideButton);
continueButton.down = function () {
// Logic to continue the presentation
LK.showYouWin(); // Placeholder for actual continue logic
};
restartButton.down = function () {
// Logic to restart the presentation
presentation.currentSlide = 0;
presentation.updateSlide();
};
nextSlideButton.down = function () {
// Logic to go to the next slide
presentation.nextSlide();
};
});
var HomePage = Container.expand(function () {
var self = Container.call(this);
var title = self.attachAsset('title', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 1366
});
var titleText = new Text2('Upit \n Repositioning', {
size: 150,
fill: 0xFFFFFF,
align: 'center'
});
titleText.anchor.set(0.5, 0.5);
titleText.x = title.x;
titleText.y = title.y;
self.addChild(titleText);
});
var LeftIcon = Container.expand(function () {
var self = Container.call(this);
var icon = self.attachAsset('leftIcon', {
anchorX: 0.5,
anchorY: 0.5,
x: 100,
y: 1366
});
});
var NextScreen = Container.expand(function () {
var self = Container.call(this);
var title = self.attachAsset('title', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 1366
});
var titleText = new Text2('Upit is \n more than \n Just a Game Engine', {
size: 150,
fill: 0xFFFFFF,
align: 'center'
});
titleText.anchor.set(0.5, 0.5);
titleText.x = title.x;
titleText.y = title.y;
self.addChild(titleText);
});
var Presentation = Container.expand(function () {
var self = Container.call(this);
self.slides = [];
self.currentSlide = 0;
self.addSlide = function (slide) {
self.slides.push(slide);
};
self.nextSlide = function () {
if (self.currentSlide < self.slides.length - 1) {
self.currentSlide++;
self.updateSlide();
}
};
self.prevSlide = function () {
if (self.currentSlide > 0) {
self.currentSlide--;
self.updateSlide();
}
};
self.updateSlide = function () {
// Update the displayed slide
};
self.update = function () {
// Update presentation content
};
});
var RightIcon = Container.expand(function () {
var self = Container.call(this);
var icon = self.attachAsset('rightIcon', {
anchorX: 0.5,
anchorY: 0.5,
x: 1948,
y: 1366
});
});
var Slide = Container.expand(function () {
var self = Container.call(this);
self.update = function () {
// Update slide content
};
});
var ThirdScreen = Container.expand(function () {
var self = Container.call(this);
var title = self.attachAsset('title', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 1366
});
var titleText = new Text2('Upit has \n enormous potential \n to disrupt the education \n sector worldwide', {
size: 150,
fill: 0xFFFFFF,
align: 'center'
});
titleText.anchor.set(0.5, 0.5);
titleText.x = title.x;
titleText.y = title.y;
self.addChild(titleText);
});
var ProgressText = Text2.expand(function () {
var self = Text2.call(this, '', {
size: 50,
fill: 0xFFFFFF,
align: 'center'
});
self.anchor.set(0.5, 0.5);
self.update = function () {
self.setText('Screen ' + (presentation.currentSlide + 1) + ' of ' + presentation.slides.length);
};
});
/****
* Initialize Game
****/
var game = new LK.Game({
title: "SlideDeck Pro",
description: "An interactive presentation tool built with the LK game engine. Create dynamic slides with professional transitions, responsive layouts, and touch navigation. Engage your audience with interactive elements and animations for impactful meetings, pitches, or educational presentations.",
backgroundColor: 0x000000
});
/****
* Game Code
****/
var homePage = game.addChild(new HomePage());
var nextScreen = game.addChild(new NextScreen());
var thirdScreen = game.addChild(new ThirdScreen());
nextScreen.visible = false;
thirdScreen.visible = false;
var fourthScreen = game.addChild(new FourthScreen());
fourthScreen.visible = false;
var presentation = new Presentation();
var progressText = game.addChild(new ProgressText());
progressText.x = 1024;
progressText.y = 50;
var leftIcon = game.addChild(new LeftIcon());
var rightIcon = game.addChild(new RightIcon());
leftIcon.down = function () {
if (nextScreen.visible) {
nextScreen.visible = false;
homePage.visible = true;
} else if (thirdScreen.visible) {
thirdScreen.visible = false;
nextScreen.visible = true;
} else if (fourthScreen.visible) {
fourthScreen.visible = false;
thirdScreen.visible = true;
}
};
rightIcon.down = function () {
if (homePage.visible) {
homePage.visible = false;
nextScreen.visible = true;
} else if (nextScreen.visible) {
nextScreen.visible = false;
thirdScreen.visible = true;
} else if (thirdScreen.visible) {
thirdScreen.visible = false;
fourthScreen.visible = true;
}
};