-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add loader - add filling content - get countdown working
- Loading branch information
1 parent
52836da
commit 337a4d8
Showing
23 changed files
with
255 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
GAME="0x06be55931ec7e63fe429d677677b03302f724b966dde8241cb08c2da76ed5895" | ||
GAME="0x055b3d17ac13c34e758e58c522724edab81163abe4ca1a5b2acc06b258e5d783" | ||
START=873000 | ||
MONGO_CONNECTION_STRING="mongodb://mongo:mongo@indexer-mongo-1:27017" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React, { useState, useEffect } from "react"; | ||
|
||
const RowLoader: React.FC = () => { | ||
const cols = 6; // Change to 6 columns | ||
const [loaderData, setLoaderData] = useState<number[]>(Array(cols).fill(-1)); | ||
|
||
useEffect(() => { | ||
const row = loaderData; | ||
const randomStartX = Math.floor(Math.random() * cols); | ||
|
||
row[randomStartX] = 0; // Set the initial square to 0 | ||
|
||
let order = 0; | ||
for (let i = 0; i < cols; i++) { | ||
row[i] = order++; | ||
} | ||
|
||
setLoaderData([...row]); | ||
}, []); | ||
|
||
return ( | ||
<div className="w-full h-full flex items-center justify-center"> | ||
<div className="w-full h-full relative flex items-center justify-between gap-1"> | ||
{loaderData.map((order, colIndex) => ( | ||
<div | ||
key={colIndex} | ||
className={`w-6 h-6 ${ | ||
order !== -1 ? "bg-terminal-green animate-ping" : "" | ||
}`} | ||
style={{ | ||
animationDelay: order !== -1 ? `${order * 0.2}s` : "0s", | ||
}} | ||
/> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default RowLoader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { useEffect, useState } from "react"; | ||
import { ActionsTutorial } from "../tutorial/ActionsTutorial"; | ||
import { AdventurerTutorial } from "../tutorial/AdventurerTutorial"; | ||
import { BeastTutorial } from "../tutorial/BeastTutorial"; | ||
import { UpgradeTutorial } from "../tutorial/UpgradeTutorial"; | ||
import RowLoader from "../animations/RowLoadre"; | ||
|
||
export default function Hints() { | ||
const [currentIndex, setCurrentIndex] = useState(0); | ||
const tutorials = [ | ||
<ActionsTutorial key={0} />, | ||
<AdventurerTutorial key={1} />, | ||
<BeastTutorial key={2} />, | ||
<UpgradeTutorial key={3} />, | ||
]; | ||
useEffect(() => { | ||
if (currentIndex < tutorials.length - 1) { | ||
const timer = setTimeout(() => { | ||
setCurrentIndex((prev) => prev + 1); | ||
}, 10000); | ||
return () => { | ||
clearTimeout(timer); | ||
}; | ||
} else if (currentIndex === tutorials.length - 1) { | ||
const timer = setTimeout(() => { | ||
setCurrentIndex(0); | ||
}, 10000); | ||
return () => clearTimeout(timer); | ||
} | ||
}, [currentIndex]); | ||
|
||
return ( | ||
<div className="flex flex-col w-1/2 items-center justify-center h-full"> | ||
<p className="text-4xl h-1/6 flex justify-center items-center">Hints</p> | ||
<div className="flex flex-col border border-terminal-green bg-black p-12 h-5/6 w-3/4"> | ||
<div className="w-full h-1/6"> | ||
<RowLoader /> | ||
</div> | ||
<div className="w-full h-5/6">{tutorials[currentIndex]}</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.