王虎 6 lat temu
rodzic
commit
a5310d4192

+ 1 - 0
projects/colorrun/json/global.json

@@ -0,0 +1 @@
+{"rank_consumeitem":{"key":"rank_consumeitem","value":"20"},"rank_player_count":{"key":"rank_player_count","value":"10"}}

+ 1 - 0
projects/colorrun/json/global_setting.json

@@ -0,0 +1 @@
+{"rank_consumeitem":{"key":"rank_consumeitem","value":"2"},"rank_consumenum":{"key":"rank_consumenum","value":"20"},"rank_player_count":{"key":"rank_player_count","value":"10"}}

Plik diff jest za duży
+ 1 - 0
projects/colorrun/json/rank_level.json


Plik diff jest za duży
+ 1 - 0
projects/colorrun/json/rank_rewards.json


Plik diff jest za duży
+ 1 - 0
projects/colorrun/json/virtual_user.json


+ 67 - 0
projects/colorrun/model/GlobalSetting.php

@@ -0,0 +1,67 @@
+<?php
+
+class GlobalSetting
+{
+    /**
+     * Returns table name mapped in the model.
+     *
+     * @return string
+     */
+    public static function getSource()
+    {
+        return 'global_setting';
+    }
+
+    /**
+     * 获取导出给客户端所需要的字段
+     *
+     * @return array
+     */
+    public static function getToClientColumns()
+    {
+         return [];
+    }
+
+    /**
+     * 生成客户端需要的字段, 生成列表
+     *
+     * @return array
+     */
+    public static function getListForClient()
+    {
+        $data = [];
+        if (empty(self::getToClientColumns())) {
+            $data = array_values(self::getList());
+        } else {
+            foreach (self::getList() as $key => $value) {
+                foreach ($value as $k => $v) {
+                    if (!in_array($k, self::getToClientColumns())) {
+                        unset($value[$k]);
+                    }
+                }
+                $data[] = $value;
+            }
+        }
+        return $data;
+    }
+
+    /**
+     * 获取单条配置内容
+     *
+     * @return array
+     */
+    public static function get($configId)
+    {
+        return IConfig::get()->loadAppConfig(self::getSource(), $configId);
+    }
+
+    /**
+     * 获取所有配置
+     *
+     * @return array
+     */
+    public static function getList()
+    {
+        return IConfig::get()->loadAppConfig(self::getSource());
+    }
+}

+ 67 - 0
projects/colorrun/model/RankLevel.php

@@ -0,0 +1,67 @@
+<?php
+
+class RankLevel
+{
+    /**
+     * Returns table name mapped in the model.
+     *
+     * @return string
+     */
+    public static function getSource()
+    {
+        return 'rank_level';
+    }
+
+    /**
+     * 获取导出给客户端所需要的字段
+     *
+     * @return array
+     */
+    public static function getToClientColumns()
+    {
+         return [];
+    }
+
+    /**
+     * 生成客户端需要的字段, 生成列表
+     *
+     * @return array
+     */
+    public static function getListForClient()
+    {
+        $data = [];
+        if (empty(self::getToClientColumns())) {
+            $data = array_values(self::getList());
+        } else {
+            foreach (self::getList() as $key => $value) {
+                foreach ($value as $k => $v) {
+                    if (!in_array($k, self::getToClientColumns())) {
+                        unset($value[$k]);
+                    }
+                }
+                $data[] = $value;
+            }
+        }
+        return $data;
+    }
+
+    /**
+     * 获取单条配置内容
+     *
+     * @return array
+     */
+    public static function get($configId)
+    {
+        return IConfig::get()->loadAppConfig(self::getSource(), $configId);
+    }
+
+    /**
+     * 获取所有配置
+     *
+     * @return array
+     */
+    public static function getList()
+    {
+        return IConfig::get()->loadAppConfig(self::getSource());
+    }
+}

+ 67 - 0
projects/colorrun/model/RankRewards.php

@@ -0,0 +1,67 @@
+<?php
+
+class RankRewards
+{
+    /**
+     * Returns table name mapped in the model.
+     *
+     * @return string
+     */
+    public static function getSource()
+    {
+        return 'rank_rewards';
+    }
+
+    /**
+     * 获取导出给客户端所需要的字段
+     *
+     * @return array
+     */
+    public static function getToClientColumns()
+    {
+         return [];
+    }
+
+    /**
+     * 生成客户端需要的字段, 生成列表
+     *
+     * @return array
+     */
+    public static function getListForClient()
+    {
+        $data = [];
+        if (empty(self::getToClientColumns())) {
+            $data = array_values(self::getList());
+        } else {
+            foreach (self::getList() as $key => $value) {
+                foreach ($value as $k => $v) {
+                    if (!in_array($k, self::getToClientColumns())) {
+                        unset($value[$k]);
+                    }
+                }
+                $data[] = $value;
+            }
+        }
+        return $data;
+    }
+
+    /**
+     * 获取单条配置内容
+     *
+     * @return array
+     */
+    public static function get($configId)
+    {
+        return IConfig::get()->loadAppConfig(self::getSource(), $configId);
+    }
+
+    /**
+     * 获取所有配置
+     *
+     * @return array
+     */
+    public static function getList()
+    {
+        return IConfig::get()->loadAppConfig(self::getSource());
+    }
+}

+ 67 - 0
projects/colorrun/model/VirtualUser.php

@@ -0,0 +1,67 @@
+<?php
+
+class VirtualUser
+{
+    /**
+     * Returns table name mapped in the model.
+     *
+     * @return string
+     */
+    public static function getSource()
+    {
+        return 'virtual_user';
+    }
+
+    /**
+     * 获取导出给客户端所需要的字段
+     *
+     * @return array
+     */
+    public static function getToClientColumns()
+    {
+         return [];
+    }
+
+    /**
+     * 生成客户端需要的字段, 生成列表
+     *
+     * @return array
+     */
+    public static function getListForClient()
+    {
+        $data = [];
+        if (empty(self::getToClientColumns())) {
+            $data = array_values(self::getList());
+        } else {
+            foreach (self::getList() as $key => $value) {
+                foreach ($value as $k => $v) {
+                    if (!in_array($k, self::getToClientColumns())) {
+                        unset($value[$k]);
+                    }
+                }
+                $data[] = $value;
+            }
+        }
+        return $data;
+    }
+
+    /**
+     * 获取单条配置内容
+     *
+     * @return array
+     */
+    public static function get($configId)
+    {
+        return IConfig::get()->loadAppConfig(self::getSource(), $configId);
+    }
+
+    /**
+     * 获取所有配置
+     *
+     * @return array
+     */
+    public static function getList()
+    {
+        return IConfig::get()->loadAppConfig(self::getSource());
+    }
+}

+ 18 - 0
projects/colorrun/output/global_setting.config.php

@@ -0,0 +1,18 @@
+<?php
+return array (
+  'rank_consumeitem' => 
+  array (
+    'key' => 'rank_consumeitem',
+    'value' => '2',
+  ),
+  'rank_consumenum' => 
+  array (
+    'key' => 'rank_consumenum',
+    'value' => '20',
+  ),
+  'rank_player_count' => 
+  array (
+    'key' => 'rank_player_count',
+    'value' => '10',
+  ),
+);

+ 129 - 0
projects/colorrun/output/rank_level.config.php

@@ -0,0 +1,129 @@
+<?php
+return array (
+  1 => 
+  array (
+    'id' => 1,
+    'title' => '青铜3',
+    'icon' => 'icon_1',
+  ),
+  2 => 
+  array (
+    'id' => 2,
+    'title' => '青铜2',
+    'icon' => 'icon_2',
+  ),
+  3 => 
+  array (
+    'id' => 3,
+    'title' => '青铜1',
+    'icon' => 'icon_3',
+  ),
+  4 => 
+  array (
+    'id' => 4,
+    'title' => '白银3',
+    'icon' => 'icon_4',
+  ),
+  5 => 
+  array (
+    'id' => 5,
+    'title' => '白银2',
+    'icon' => 'icon_5',
+  ),
+  6 => 
+  array (
+    'id' => 6,
+    'title' => '白银1',
+    'icon' => 'icon_6',
+  ),
+  7 => 
+  array (
+    'id' => 7,
+    'title' => '黄金4',
+    'icon' => 'icon_7',
+  ),
+  8 => 
+  array (
+    'id' => 8,
+    'title' => '黄金3',
+    'icon' => 'icon_8',
+  ),
+  9 => 
+  array (
+    'id' => 9,
+    'title' => '黄金2',
+    'icon' => 'icon_9',
+  ),
+  10 => 
+  array (
+    'id' => 10,
+    'title' => '黄金1',
+    'icon' => 'icon_10',
+  ),
+  11 => 
+  array (
+    'id' => 11,
+    'title' => '钻石5',
+    'icon' => 'icon_11',
+  ),
+  12 => 
+  array (
+    'id' => 12,
+    'title' => '钻石4',
+    'icon' => 'icon_12',
+  ),
+  13 => 
+  array (
+    'id' => 13,
+    'title' => '钻石3',
+    'icon' => 'icon_13',
+  ),
+  14 => 
+  array (
+    'id' => 14,
+    'title' => '钻石2',
+    'icon' => 'icon_14',
+  ),
+  15 => 
+  array (
+    'id' => 15,
+    'title' => '钻石1',
+    'icon' => 'icon_15',
+  ),
+  16 => 
+  array (
+    'id' => 16,
+    'title' => '大师5',
+    'icon' => 'icon_16',
+  ),
+  17 => 
+  array (
+    'id' => 17,
+    'title' => '大师4',
+    'icon' => 'icon_17',
+  ),
+  18 => 
+  array (
+    'id' => 18,
+    'title' => '大师3',
+    'icon' => 'icon_18',
+  ),
+  19 => 
+  array (
+    'id' => 19,
+    'title' => '大师2',
+    'icon' => 'icon_19',
+  ),
+  20 => 
+  array (
+    'id' => 20,
+    'title' => '大师1',
+    'icon' => 'icon_20',
+  ),
+  21 => 
+  array (
+    'id' => 21,
+    'title' => '王者',
+    'icon' => 'icon_21',
+  ),
+);

+ 73 - 0
projects/colorrun/output/rank_rewards.config.php

@@ -0,0 +1,73 @@
+<?php
+return array (
+  1 => 
+  array (
+    'id' => 1,
+    'level' => 1,
+    'rewarditem' => '2',
+    'rewardnum' => '50',
+  ),
+  2 => 
+  array (
+    'id' => 2,
+    'level' => 0,
+    'rewarditem' => '',
+    'rewardnum' => '',
+  ),
+  3 => 
+  array (
+    'id' => 3,
+    'level' => 0,
+    'rewarditem' => '',
+    'rewardnum' => '',
+  ),
+  4 => 
+  array (
+    'id' => 4,
+    'level' => 0,
+    'rewarditem' => '',
+    'rewardnum' => '',
+  ),
+  5 => 
+  array (
+    'id' => 5,
+    'level' => 0,
+    'rewarditem' => '',
+    'rewardnum' => '',
+  ),
+  6 => 
+  array (
+    'id' => 6,
+    'level' => -1,
+    'rewarditem' => '',
+    'rewardnum' => '',
+  ),
+  7 => 
+  array (
+    'id' => 7,
+    'level' => -1,
+    'rewarditem' => '',
+    'rewardnum' => '',
+  ),
+  8 => 
+  array (
+    'id' => 8,
+    'level' => -1,
+    'rewarditem' => '',
+    'rewardnum' => '',
+  ),
+  9 => 
+  array (
+    'id' => 9,
+    'level' => -1,
+    'rewarditem' => '',
+    'rewardnum' => '',
+  ),
+  10 => 
+  array (
+    'id' => 10,
+    'level' => -1,
+    'rewarditem' => '',
+    'rewardnum' => '',
+  ),
+);

Plik diff jest za duży
+ 6003 - 0
projects/colorrun/output/virtual_user.config.php


BIN
projects/colorrun/source/colorrun.xlsx