/** * Snap constructor. * * @param Deck $deck */ public function __construct(Deck $deck) { parent::__construct($deck); $this->setup(); $this->deal(); $this->play(); }
function __construct() { parent::__construct(); // Ball $x = Game::$config["width"] / 2 - 10; $y = Game::$config["height"] / 2 - 10; $this->ball = new Ball($x, $y, [255, 255, 255, 255]); // Paddle 1 $width = 10; $height = 60; $x = 20; $y = Game::$config["height"] / 2 - $height / 2; $this->paddles[0] = new Paddle($x, $y, $width, $height, [255, 255, 255, 255]); $this->paddles[0]->points_x = 300; $this->paddles[0]->points_y = 20; // Paddle 2 $width = 10; $height = 60; $x = Game::$config["width"] - 20 - $width; $y = Game::$config["height"] / 2 - $height / 2; $this->paddles[1] = new Paddle($x, $y, $width, $height, [255, 255, 255, 255]); $this->paddles[1]->points_x = 700; $this->paddles[1]->points_y = 20; Game::new_font("font1", "assets/font.ttf", 32); Game::set_font("font1"); Game::new_sound("paddle", "assets/paddle.ogg", "static"); Game::new_sound("wall", "assets/wall.ogg", "static"); Game::new_sound("win", "assets/win.ogg", "static"); $this->init(); }
public function __construct() { #添加读取缓存配置 $this->cache_array['gold_exchange_table'] = array('obj' => 'PlayerDetail', 'class' => 'Cache_GoldExchange', 'function' => 'get_gold_exchange_info'); $this->cache_array['gold_chest_award_table'] = array('obj' => 'PlayerDetail', 'class' => 'Cache_GoldChestAward', 'function' => 'get_gold_chest_award_info'); #$this->cache_array['times_table'] = array('obj' => 'PlayerDetail', 'class' => 'Cache_GoldExchangeLimit', 'function' => 'get_gold_exchange_limit_info'); parent::__construct('game', 'game'); }
public function __construct() { //添加读取缓存配置 parent::__construct('game', 'game'); $this->_operator_id = OPERATOR_ID; #$this->_operator_id = 82; #腾讯 #$this->blue_info = $this->get_blue_info(); }
public function __construct() { parent::__construct('game', 'game'); $this->task_flush_time = mktime(12, 0, 0); $this->current_time = time(); $this->start_unix_timestamp = strtotime(date('Y-m-d')); # mktime(0,0,0) }
public function __construct() { #添加读取缓存配置 $this->cache_array['sign_table'] = array('obj' => 'DailySign', 'class' => 'Cache_DailySign', 'function' => 'get_daily_sign_info'); $this->cache_array['sign_limit_table'] = array('obj' => 'DailySign', 'class' => 'Cache_DailySignLimit', 'function' => 'get_daily_sign_limit_info'); $this->cache_array['login_table'] = array('obj' => 'DailySign', 'class' => 'Cache_CumulativeLogin', 'function' => 'get_cumulative_login_info'); parent::__construct('game', 'game'); }
public function __construct() { #添加读取缓存配置 $this->cache_array['chest_table'] = array('obj' => 'UnionBoonHall', 'class' => 'Cache_UnionBoonChestAward', 'function' => 'get_union_boon_chest_award_info'); $this->cache_array['task_table'] = array('obj' => 'UnionBoonHall', 'class' => 'Cache_UnionBoonTask', 'function' => 'get_union_boon_task_info'); $this->cache_array['func_config'] = array('obj' => 'UnionBoonHall', 'class' => 'Cache_FuncConfig', 'function' => 'get_func_config_info'); parent::__construct('game', 'game'); }
public function __construct() { #添加读取缓存配置 $this->cache_array['player_wing_table'] = array('obj' => 'PlayerDetail', 'class' => 'Cache_PlayerWing', 'function' => 'get_player_wing_info'); $this->cache_array['prop_table'] = array('obj' => 'PlayerDetail', 'class' => 'Cache_Prop', 'function' => 'get_prop_info'); parent::__construct('game', 'game'); $this->current_time = time(); }
public function __construct() { //添加读取缓存配置 parent::__construct('game', 'game'); $this->_operator_id = OPERATOR_ID; $this->_operator_id = 69; $this->player_360_info = $this->get_360_info(); }
public function __construct() { parent::__construct('game', 'game'); $this->current_time = time(); $max_intensify_lv = Cache_Forge::getInstance()->get_max_intensify_lv(); if (!empty($max_intensify_lv)) { $this->max_intensify_lv = $max_intensify_lv; } }
public function __construct() { #添加读取缓存配置 $this->cache_array['daliy_active'] = array('obj' => 'DailyActive', 'class' => 'Cache_DaliyActive', 'function' => 'get_daliy_active_info'); $this->cache_array['daliy_active_group'] = array('obj' => 'DailyActive', 'class' => 'Cache_DaliyActiveGroup', 'function' => 'get_daliy_active_group_info'); $this->cache_array['daliy_active_reward'] = array('obj' => 'DailyActive', 'class' => 'Cache_DaliyActiveReward', 'function' => 'get_daliy_active_reward_info'); parent::__construct('game', 'game'); $this->current_time = time(); }
public function __construct() { //添加读取缓存配置 parent::__construct('game', 'game'); #echo "<pre>"; $this->_operator_id = OPERATOR_ID; #$this->_operator_id = 82; #腾讯 #$this->yellow_info = $this->get_yellow_info(); }
public function __construct() { #添加读取缓存配置 $this->cache_array['base_table'] = array('obj' => 'UnionWanted', 'class' => 'Cache_UnionWantedBase', 'function' => 'get_union_wanted_base_info'); $this->cache_array['fb_table'] = array('obj' => 'UnionWanted', 'class' => 'Cache_UnionWantedFB', 'function' => 'get_union_wanted_fb_info'); $this->cache_array['award_table'] = array('obj' => 'UnionWanted', 'class' => 'Cache_UnionWantedAward', 'function' => 'get_union_wanted_award_info'); $this->cache_array['fortune_table'] = array('obj' => 'UnionWanted', 'class' => 'Cache_UnionWantedFortune', 'function' => 'get_union_wanted_fortune_info'); $this->cache_array['language_table'] = array('obj' => 'UnionWanted', 'class' => 'Cache_Language', 'function' => 'get_language_info'); $this->cache_array['times_table'] = array('obj' => 'UnionWanted', 'class' => 'Cache_TimesExpendControl', 'function' => 'get_times_expend_control_info'); $this->cache_array['award_base_table'] = array('obj' => 'UnionWanted', 'class' => 'Cache_UnionWantedAwardBase', 'function' => 'get_union_wanted_award_base_info'); parent::__construct('game', 'game'); }
public function __construct() { //添加读取缓存配置 $this->cache_array['fb_award_table'] = array('obj' => 'PlayerFB', 'class' => 'Cache_MapAward', 'function' => 'get_map_award_info'); $this->cache_array['fb_grade_table'] = array('obj' => 'PlayerFB', 'class' => 'Cache_MapGrade', 'function' => 'get_map_grade_info'); $this->cache_array['fb_table'] = array('obj' => 'PlayerFB', 'class' => 'Cache_PlayerFB', 'function' => 'get_player_fb_info'); $this->cache_array['chapter_table'] = array('obj' => 'PlayerFB', 'class' => 'Cache_PlayerFB', 'function' => 'get_player_chapter_info'); $this->cache_array['drop_loot_lib_table'] = array('obj' => 'PlayerFB', 'class' => 'Cache_PropLoot', 'function' => 'get_prop_loot'); $this->cache_array['achievement_award_table'] = array('obj' => 'PlayerFB', 'class' => 'Cache_AchievementAward', 'function' => 'get_achievement_award_info'); $this->cache_array['chapter_award_table'] = array('obj' => 'PlayerFB', 'class' => 'Cache_MapChapterAward', 'function' => 'get_chapter_award_info'); $this->cache_array['fb_entr_table'] = array('obj' => 'PlayerFB', 'class' => 'Cache_MapEntr', 'function' => 'get_map_entr_info'); $this->cache_array['buy_times_table'] = array('obj' => 'PlayerFB', 'class' => 'Cache_BuyTimes', 'function' => 'get_buy_times_info'); $this->cache_array['fb_entr_next_table'] = array('obj' => 'PlayerFB', 'class' => 'Cache_MapEntr', 'function' => 'get_map_entr_info_by_next_map_id'); $this->cache_array['map_chapter_table'] = array('obj' => 'PlayerFB', 'class' => 'Cache_MapChapter', 'function' => 'get_map_chapter_info'); $this->cache_array['map_table'] = array('obj' => 'PlayerFB', 'class' => 'Cache_PlayerFB', 'function' => 'get_map_info'); $this->cache_array['prop_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_Prop', 'function' => 'get_prop_info'); $this->cache_array['npc_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_Npc', 'function' => 'get_npc_info'); $this->cache_array['npc_spawn_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_NpcSpawn', 'function' => 'get_npc_spawn_info'); parent::__construct('game', 'game'); }
public function __construct() { //添加读取缓存配置 $this->cache_array['hero_type_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_HeroType', 'function' => 'get_hero_type_info'); $this->cache_array['hero_level_exp_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_HeroLevelExp', 'function' => 'get_hero_level_exp_info'); $this->cache_array['hero_quality_exp_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_HeroQualityExp', 'function' => 'get_hero_quality_exp_info'); $this->cache_array['hero_attr_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_HeroAttr', 'function' => 'get_hero_attr_info'); $this->cache_array['hero_star_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_HeroStar', 'function' => 'get_hero_star_info'); $this->cache_array['hero_fit_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_HeroFit', 'function' => 'get_hero_fit_info'); $this->cache_array['hero_skill_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_HeroSkill', 'function' => 'get_hero_skill_info'); $this->cache_array['hero_potential_base_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_HeroPotentialBase', 'function' => 'get_hero_potential_base_info'); $this->cache_array['hero_potential_culture_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_HeroPotentialCulture', 'function' => 'get_hero_potential_culture_info'); $this->cache_array['hero_potential_grow_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_HeroPotentialGrow', 'function' => 'get_hero_potential_grow_info'); $this->cache_array['prop_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_Prop', 'function' => 'get_prop_info'); $this->cache_array['hero_decompose_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_HeroDecompose', 'function' => 'get_hero_decompose_info'); $this->cache_array['skill_passive_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_SkillPassive', 'function' => 'get_skill_passive_info'); $this->cache_array['skill_buff_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_SkillBuff', 'function' => 'get_skill_buff_info'); $this->cache_array['skill_formula_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_SkillFormula', 'function' => 'get_skill_formula_info'); parent::__construct('game', 'game'); }
public function __construct() { parent::__construct('game', 'game'); $this->challenge_reward_time = mktime(22, 0, 0); $this->current_time = time(); $this->current_time_head = mktime(0, 0, 0); $buf_flush_t1 = mktime(10, 0, 0); # 第一次刷新时间10点 $buf_flush_t2 = mktime(14, 0, 0); # 第二次刷新时间14点 $buf_flush_t3 = mktime(18, 0, 0); # 第三次刷新时间18点 $buf_flush_t4 = mktime(22, 0, 0); # 第四次刷新时间22点 $mon_flush_t1 = mktime(8, 0, 0); # 第一次刷新时间8点 $mon_flush_t2 = mktime(12, 0, 0); # 第二次刷新时间12点 $mon_flush_t3 = mktime(16, 0, 0); # 第三次刷新时间16点 $mon_flush_t4 = mktime(20, 45, 0); # 第四次刷新时间20:45点 $this->challenge_reward_buff_flush_s2t[1] = $buf_flush_t1; $this->challenge_reward_buff_flush_s2t[2] = $buf_flush_t2; $this->challenge_reward_buff_flush_s2t[3] = $buf_flush_t3; $this->challenge_reward_buff_flush_s2t[4] = $buf_flush_t4; $this->challenge_reward_buff_flush_t2s[$buf_flush_t1] = 1; $this->challenge_reward_buff_flush_t2s[$buf_flush_t2] = 2; $this->challenge_reward_buff_flush_t2s[$buf_flush_t3] = 3; $this->challenge_reward_buff_flush_t2s[$buf_flush_t4] = 4; $this->challenge_monster_flush_s2t[1] = $mon_flush_t1; $this->challenge_monster_flush_s2t[2] = $mon_flush_t2; $this->challenge_monster_flush_s2t[3] = $mon_flush_t3; $this->challenge_monster_flush_s2t[4] = $mon_flush_t4; $this->challenge_monster_flush_t2s[$mon_flush_t1] = 1; $this->challenge_monster_flush_t2s[$mon_flush_t2] = 2; $this->challenge_monster_flush_t2s[$mon_flush_t3] = 3; $this->challenge_monster_flush_t2s[$mon_flush_t4] = 4; }
public function __construct() { parent::__construct('game', 'game'); }
public function __construct() { parent::__construct('game', 'game'); $this->current_time = time(); }
public function __construct() { parent::__construct('game', 'game'); $this->arrUnion = array(); }
public function __construct() { #添加读取缓存配置 $this->cache_array['guide_table'] = array('obj' => 'UnionGuide', 'class' => 'Cache_UnionGuide', 'function' => 'get_union_guide_info'); parent::__construct('game', 'game'); }
public function __construct() { //添加读取缓存配置 parent::__construct('game', 'game'); }
public function __construct() { parent::__construct('game', 'game'); $this->current_time = time(); $this->flush_time = Com_Util::get_next_week_day($this->current_time) + 22 * 3600; }
public function __construct() { #添加读取缓存配置 $this->cache_array['pgf_table'] = array('obj' => 'PlayerGradeFunc', 'class' => 'Cache_PlayerGradeFunc', 'function' => 'get_player_grade_func_info'); parent::__construct('game', 'game'); }
public function __construct($gameData) { parent::__construct($gameData); }
public function __construct() { $this->cache_array['hero_attr_table'] = array('obj' => 'PlayerHero', 'class' => 'Cache_HeroAttr', 'function' => 'get_hero_attr_info'); parent::__construct('game', 'game'); }
function __construct() { parent::__construct(); echo "Your minimal game has been started.\n"; $this->init(); }
public function __construct() { #添加读取缓存配置 $this->cache_array['mtb_table'] = array('obj' => 'PlayerDetail', 'class' => 'Cache_MicroTerminalBag', 'function' => 'get_micro_terminal_bag_info'); parent::__construct('game', 'game'); }
public function __construct() { #添加读取缓存配置 $this->cache_array['activities_table'] = array('obj' => 'UnionActivities', 'class' => 'Cache_UnionActivities', 'function' => 'get_union_activities_info'); parent::__construct('game', 'game'); }
public function __construct() { parent::__construct('game', 'game'); //echo "<pre>"; }
/** * Create a new game from a game ID; create the parent for UPDATE so that * no-one else can process this game at the same tiem * * @param int $id Game ID */ public function __construct($id) { if (is_array($id)) { $id = (int) $id['id']; } $GLOBALS['GAMEID'] = (int) $id; parent::__construct((int) $id, UPDATE); }