Обучение. Начало Frontend части
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
<?
|
||||
|
||||
use DarksLight2\Training\TrainingManager;
|
||||
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
@@ -6,8 +9,11 @@ if(!defined('GAME'))
|
||||
require_once('/home/newcom1/public_html/_incl_data/__config.php');
|
||||
require_once('/home/newcom1/public_html/_incl_data/class/__db_connect.php');
|
||||
|
||||
if($u->room['file']=='cp1')
|
||||
{
|
||||
if($u->room['file']=='cp1') {
|
||||
|
||||
$training_manager = TrainingManager::getInstance();
|
||||
$training_manager->first_step->render();
|
||||
|
||||
if(date("H")>=8 && date("H")<=23) {
|
||||
$now = 'day';
|
||||
$tattack = '<a style="color:#D8D8D8" style="cursor:pointer" onclick="top.useMagic(\'Нападение на персонажа\',\'night_atack\',\'pal_button8.gif\',1,\'main.php?nightatack=1\');">Напасть на игрока</a> ';
|
||||
|
||||
@@ -5,7 +5,24 @@ use DarksLight2\Training\TrainingManager;
|
||||
$short_name = 'first_step';
|
||||
|
||||
$manager = TrainingManager::getInstance();
|
||||
$step = $manager->$short_name;
|
||||
$button_text = 'Продолжить';
|
||||
if(!$manager) {
|
||||
$button_text = '';
|
||||
}
|
||||
?>
|
||||
|
||||
var_dump($manager->$short_name->progress);
|
||||
<script>
|
||||
const training_data = () => {
|
||||
return {
|
||||
content: `<?=$step->message?>`,
|
||||
title: `<?=$step->title?>`,
|
||||
button_text: `<?=$button_text?>`
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script src="/js/training/modal.js"></script>
|
||||
|
||||
echo 'it\'s work';
|
||||
<script>
|
||||
modal.show()
|
||||
</script>
|
||||
Reference in New Issue
Block a user