当前位置: 首页>>代码示例>>PHP>>正文


PHP Game::__construct方法代码示例

本文整理汇总了PHP中Game::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Game::__construct方法的具体用法?PHP Game::__construct怎么用?PHP Game::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Game的用法示例。


在下文中一共展示了Game::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Snap constructor.
  *
  * @param Deck $deck
  */
 public function __construct(Deck $deck)
 {
     parent::__construct($deck);
     $this->setup();
     $this->deal();
     $this->play();
 }
开发者ID:danneaves,项目名称:php_snap,代码行数:12,代码来源:Snap.php

示例2: Ball

 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();
 }
开发者ID:jessehorne,项目名称:ponghp,代码行数:30,代码来源:app.php

示例3: __construct

 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');
 }
开发者ID:bluefan,项目名称:phpsource,代码行数:8,代码来源:PlayerCoinExchange.php

示例4: __construct

 public function __construct()
 {
     //添加读取缓存配置
     parent::__construct('game', 'game');
     $this->_operator_id = OPERATOR_ID;
     #$this->_operator_id = 82; #腾讯
     #$this->blue_info = $this->get_blue_info();
 }
开发者ID:bluefan,项目名称:phpsource,代码行数:8,代码来源:TencentBlueSpecial.php

示例5: __construct

 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)
 }
开发者ID:bluefan,项目名称:phpsource,代码行数:8,代码来源:TaskHandler.php

示例6: __construct

 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');
 }
开发者ID:bluefan,项目名称:phpsource,代码行数:8,代码来源:DailySign.php

示例7: __construct

 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();
 }
开发者ID:bluefan,项目名称:phpsource,代码行数:8,代码来源:PlayerWing.php

示例8: __construct

 public function __construct()
 {
     //添加读取缓存配置
     parent::__construct('game', 'game');
     $this->_operator_id = OPERATOR_ID;
     $this->_operator_id = 69;
     $this->player_360_info = $this->get_360_info();
 }
开发者ID:bluefan,项目名称:phpsource,代码行数:8,代码来源:360Special.php

示例9: __construct

 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;
     }
 }
开发者ID:bluefan,项目名称:phpsource,代码行数:9,代码来源:EquipIntensifier.php

示例10: __construct

 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();
 }
开发者ID:bluefan,项目名称:phpsource,代码行数:9,代码来源:DailyBoon.php

示例11: __construct

 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();
 }
开发者ID:bluefan,项目名称:phpsource,代码行数:9,代码来源:YellowSpecial.php

示例12: __construct

 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');
 }
开发者ID:bluefan,项目名称:phpsource,代码行数:12,代码来源:UnionWanted.php

示例13: __construct

 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');
 }
开发者ID:bluefan,项目名称:phpsource,代码行数:20,代码来源:PlayerFB.php

示例14: __construct

 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;
 }
开发者ID:bluefan,项目名称:phpsource,代码行数:39,代码来源:Challenge.php

示例15: __construct

 public function __construct()
 {
     parent::__construct('game', 'game');
 }
开发者ID:bluefan,项目名称:phpsource,代码行数:4,代码来源:TaskMain.php


注:本文中的Game::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。