Commit 8abaa190 authored by mercury233's avatar mercury233

delete old codes

parent bd0887c8
......@@ -1098,4 +1098,13 @@ public static class UIHelper
foreach (Transform achild in Transforms)
achild.gameObject.layer = parent.layer;
}
internal static Vector3 get_close(Vector3 input_vector, Camera cam, float l)
{
Vector3 o = Vector3.zero;
Vector3 scr = cam.WorldToScreenPoint(input_vector);
scr.z -= l;
o = cam.ScreenToWorldPoint(scr);
return o;
}
}
......@@ -2541,7 +2541,7 @@ public class gameCard : OCGobject
if (ballChain!=null)
{
del_all_decoration_by_string("chaining");
Vector3 pos = ui_helper.get_close(gameObject.transform.position, Program.camera_game_main, 5);
Vector3 pos = UIHelper.get_close(gameObject.transform.position, Program.camera_game_main, 5);
if (Program.I().setting.setting.Vchain.value == true)
{
MonoBehaviour.Destroy((GameObject)MonoBehaviour.Instantiate(Program.I().mod_ocgcore_cs_end, pos, Quaternion.identity), 5f);
......
......@@ -4922,7 +4922,7 @@ public class Ocgcore : ServantWithCardDescription
UIHelper.playSound("addcounter", 1);
//if (Program.YGOPro1 == false)
{
Vector3 pos = ui_helper.get_close(card.gameObject.transform.position, Program.camera_game_main, 5);
Vector3 pos = UIHelper.get_close(card.gameObject.transform.position, Program.camera_game_main, 5);
MonoBehaviour.Destroy((GameObject)MonoBehaviour.Instantiate(Program.I().mod_ocgcore_cs_end, pos, Quaternion.identity), 5f);
}
}
......@@ -4943,7 +4943,7 @@ public class Ocgcore : ServantWithCardDescription
UIHelper.playSound("removecounter", 1);
//if (Program.YGOPro1 == false)
{
Vector3 pos = ui_helper.get_close(card.gameObject.transform.position, Program.camera_game_main, 5);
Vector3 pos = UIHelper.get_close(card.gameObject.transform.position, Program.camera_game_main, 5);
MonoBehaviour.Destroy((GameObject)MonoBehaviour.Instantiate(Program.I().mod_ocgcore_cs_end, pos, Quaternion.identity), 5f);
}
}
......
......@@ -655,7 +655,7 @@ public class Servant
sp.width = 470;
for (int i = 0; i < options.Count; i++)
{
Vector2 v = ui_helper.get_hang_lie(i, 5);
Vector2 v = UIHelper.get_hang_lie(i, 5);
float hang = v.x;
float lie = v.y;
GameObject btn = create
......
fileFormatVersion: 2
guid: f52930133f54dd446bd23d432f0b4332
folderAsset: yes
timeCreated: 1469182564
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//using UnityEngine;
//using System.Collections;
//public class Delegater : MonoBehaviour
//{
// public CLIENT_SERVANT_OCGCORE.refresh_function f;
// // Use this for initialization
// void Start () {
// }
// public void function()
// {
// if (f != null) f();
// }
// // Update is called once per frame
// void Update () {
// }
//}
fileFormatVersion: 2
guid: e0685e730c8d7864e92f6cca605c4f52
timeCreated: 1480605664
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.IO;
class TXT_DEBUGER_ruined
{
public static void debug(string raw)
{
FileStream fs = new FileStream("log.txt", FileMode.Append);
StreamWriter sw = new StreamWriter(fs);
sw.Write(raw + "\n");
sw.Flush();
sw.Close();
fs.Close();
}
}
fileFormatVersion: 2
guid: 1d455ff0e7866fd44abf7aca88d2ffbc
timeCreated: 1470044743
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
//using System;
//public class GameStringHelper
//{
// public static bool differ(long a, long b)
// {
// bool r = false;
// if ((a & b) > 0) r = true;
// return r;
// }
// public static string get_attribute_string(long a)
// {
// string r = "";
// if (differ(a, (long)CardAttribute.Earth)) r += "地";
// if (differ(a, (long)CardAttribute.Water)) r += "水";
// if (differ(a, (long)CardAttribute.Fire)) r += "炎";
// if (differ(a, (long)CardAttribute.Wind)) r += "风";
// if (differ(a, (long)CardAttribute.Dark)) r += "暗";
// if (differ(a, (long)CardAttribute.Light)) r += "光";
// if (differ(a, (long)CardAttribute.Devine)) r += "神";
// r += "属性";
// return r;
// }
// public static string get_type_string(int a)
// {
// string r = "";
// if (differ(a, (long)CardType.Monster)) r += "怪物卡";
// if (differ(a, (long)CardType.Spell)) r += "魔法卡";
// if (differ(a, (long)CardType.Trap)) r += "陷阱卡";
// return r;
// }
// public static string get_detailed_type_string(int a)
// {
// string r = "";
// if (differ(a, (long)CardType.Monster)) r += "怪物卡";
// if (differ(a, (long)CardType.Spell)) r += "魔法卡";
// if (differ(a, (long)CardType.Trap)) r += "陷阱卡";
// return r;
// }
// public static string get_race_string(long a)
// {
// string r = "";
// if (differ(a, (long)game_race.RACE_WARRIOR)) r += "战士";
// if (differ(a, (long)game_race.RACE_SPELLCASTER)) r += "魔法师";
// if (differ(a, (long)game_race.RACE_FAIRY)) r += "天使";
// if (differ(a, (long)game_race.RACE_FIEND)) r += "恶魔";
// if (differ(a, (long)game_race.RACE_ZOMBIE)) r += "不死";
// if (differ(a, (long)game_race.RACE_MACHINE)) r += "机械";
// if (differ(a, (long)game_race.RACE_AQUA)) r += "水";
// if (differ(a, (long)game_race.RACE_PYRO)) r += "炎";
// if (differ(a, (long)game_race.RACE_ROCK)) r += "岩石";
// if (differ(a, (long)game_race.RACE_WINDBEAST)) r += "鸟兽";
// if (differ(a, (long)game_race.RACE_PLANT)) r += "植物";
// if (differ(a, (long)game_race.RACE_INSECT)) r += "昆虫";
// if (differ(a, (long)game_race.RACE_THUNDER)) r += "雷";
// if (differ(a, (long)game_race.RACE_DRAGON)) r += "龙";
// if (differ(a, (long)game_race.RACE_BEAST)) r += "兽";
// if (differ(a, (long)game_race.RACE_BEASTWARRIOR)) r += "兽战士";
// if (differ(a, (long)game_race.RACE_DINOSAUR)) r += "恐龙";
// if (differ(a, (long)game_race.RACE_FISH)) r += "鱼";
// if (differ(a, (long)game_race.RACE_SEASERPENT)) r += "海龙";
// if (differ(a, (long)game_race.RACE_REPTILE)) r += "爬虫";
// if (differ(a, (long)game_race.RACE_PSYCHO)) r += "念动力";
// if (differ(a, (long)game_race.RACE_DEVINE)) r += "幻神兽";
// if (differ(a, (long)game_race.RACE_CREATORGOD)) r += "创造神";
// if (differ(a, (long)game_race.RACE_PHANTOMDRAGON)) r += "幻龙";
// r += "族";
// return r;
// }
// public static string get_point_string(point p)
// {
// string re = "";
// if (p.me)
// {
// re += "我的";
// }
// else
// {
// re += "对方的";
// }
// switch (p.location)
// {
// case CardLocation.Deck:
// re += "卡组中的";
// break;
// case CardLocation.Extra:
// re += "额外卡组中的";
// break;
// case CardLocation.Grave:
// re += "墓地中的";
// break;
// case CardLocation.Hand:
// re += "手上的";
// break;
// case CardLocation.MonsterZone:
// re += "前场的";
// break;
// case CardLocation.Hand:
// re += "被除外的";
// break;
// case CardLocation.SpellZone:
// re += "后场的";
// break;
// }
// re += "第" + p.index.ToString() + "张卡";
// if (p.overlay_index > 0)
// {
// re += "下面第" + p.overlay_index.ToString() + "张被叠放的卡";
// }
// switch (p.position)
// {
// case CardPosition.FaceDownAttack:
// re += "(里攻)";
// break;
// case CardPosition.FaceDown_DEFENSE:
// re += "(里守)";
// break;
// case CardPosition.FaceUpAttack:
// re += "(表攻)";
// break;
// case CardPosition.FaceUp_DEFENSE:
// re += "(表守)";
// break;
// }
// if (p.location == CardLocation.Unknown) re = "(未知区域)";
// return re;
// }
// public static string get_name_string(CardData data)
// {
// string re = "";
// if (differ(data.Type, (long)CardType.Monster)) re += "[ff8000]"+data.Name;
// else if (differ(data.Type, (long)CardType.Spell)) re += "[7FFF00]" + data.Name;
// else if (differ(data.Type, (long)CardType.Trap)) re += "[dda0dd]" + data.Name;
// else re += "[ff8000]" + data.Name;
// re += "[-]";
// return re;
// }
// public static string get_string(CardData data,bool desc=true)
// {
// string re = "";
// if ((data.Type & 0x1) > 0)
// {
// re += "[ff8000]";
// if ((data.Type & 0x10) > 0)
// {
// re += "通常|";
// }
// if ((data.Type & 0x20) > 0)
// {
// re += "效果|";
// }
// if ((data.Type & 0x40) > 0)
// {
// re += "融合|";
// }
// if ((data.Type & 0x80) > 0)
// {
// re += "仪式|";
// }
// if ((data.Type & 0x100) > 0)
// {
// re += "陷阱怪物|";
// }
// if ((data.Type & 0x200) > 0)
// {
// re += "灵魂|";
// }
// if ((data.Type & 0x400) > 0)
// {
// re += "同盟|";
// }
// if ((data.Type & 0x800) > 0)
// {
// re += "二重|";
// }
// if ((data.Type & 0x1000) > 0)
// {
// re += "调整|";
// }
// if ((data.Type & 0x2000) > 0)
// {
// re += "同调|";
// }
// if ((data.Type & 0x4000) > 0)
// {
// re += "衍生物|";
// }
// if ((data.Type & 0x200000) > 0)
// {
// re += "翻转|";
// }
// if ((data.Type & 0x400000) > 0)
// {
// re += "卡通|";
// }
// if ((data.Type & 0x800000) > 0)
// {
// re += "超量|";
// }
// if ((data.Type & 0x1000000) > 0)
// {
// re += "灵摆|";
// }
// re += get_race_string(data.Race) + "|" + get_attribute_string(data.Attribute) + "|" + data.Level.ToString() + "[sup]★[/sup]";
// if (data.LeftScale > 0) re += "|" + data.LeftScale.ToString() + "[sup]刻度[/sup]";
// re += "\n";
// if (data.Attack < 0)
// {
// re += "[sup]ATK[/sup]? ";
// }
// else
// {
// re += "[sup]ATK[/sup]" + data.Attack.ToString() + " ";
// }
// if (data.Defense < 0)
// {
// re += "[sup]DEF[/sup]?[-]\n";
// }
// else
// {
// re += "[sup]DEF[/sup]" + data.Defense.ToString() + "[-]\n";
// }
// }
// if ((data.Type & 0x2) > 0)
// {
// re += "[7FFF00]";
// if ((data.Type & 0x10000) > 0)
// {
// re += "速攻";
// }
// if ((data.Type & 0x20000) > 0)
// {
// re += "永续";
// }
// if ((data.Type & 0x40000) > 0)
// {
// re += "装备";
// }
// if ((data.Type & 0x80000) > 0)
// {
// re += "场地";
// }
// if ((data.Type & 0x80) > 0)
// {
// re += "仪式";
// }
// if (data.LeftScale > 0) re += "|" + data.LeftScale.ToString() + "[sup]刻度[/sup]";
// re += "[-]\n";
// }
// if ((data.Type & 0x4) > 0)
// {
// re += "[dda0dd]";
// if ((data.Type & 0x20000) > 0)
// {
// re += "永续";
// }
// if ((data.Type & 0x100000) > 0)
// {
// re += "反击";
// }
// re += "[-]\n";
// }
// if (data.tail.Length > 2)
// {
// re += data.tail;
// }
// if(desc)
// {
// if (re.Length > 12) re += data.Desc;
// else re = data.Desc;
// }
// return re;
// }
// public static string get_phase_string(int a)
// {
// string r = "";
// if (differ(a, (long)game_phrases.PHASE_BATTLE)) r += "战斗阶段";
// if (differ(a, (long)game_phrases.PHASE_BATTLE_START)) r += "战斗开始";
// if (differ(a, (long)game_phrases.PHASE_BATTLE_STEP)) r += "战斗步骤";
// if (differ(a, (long)game_phrases.PHASE_DAMAGE)) r += "伤害步骤";
// if (differ(a, (long)game_phrases.PHASE_DAMAGE_CAL)) r += "伤害计算";
// if (differ(a, (long)game_phrases.PHASE_DRAW)) r += "抽卡阶段";
// if (differ(a, (long)game_phrases.PHASE_END)) r += "回合结束";
// if (differ(a, (long)game_phrases.PHASE_MAIN1)) r += "主要阶段";
// if (differ(a, (long)game_phrases.PHASE_MAIN2)) r += "主要阶段";
// if (differ(a, (long)game_phrases.PHASE_STANDBY)) r += "准备阶段";
// return r;
// }
//}
fileFormatVersion: 2
guid: c348bd288e8db2d4d8ea0455b2c6a2e1
timeCreated: 1480605661
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
//using UnityEngine;
//using System.Collections;
//using System.Collections.Generic;
//public class loader : MonoBehaviour {
// private CLIENT client;
// public Camera main_camera;
// public GameObject mod_ui_2d;
// public GameObject mod_ui_3d;
// public GameObject mod_setting;
// public GameObject mod_ocgcore_button_mp;
// public GameObject mod_ocgcore_button_bp;
// public GameObject mod_ocgcore_button_ep;
// public GameObject mod_ocgcore_button_ok;
// public GameObject mod_ocgcore_button_no;
// public GameObject mod_ocgcore_button_change;
// public GameObject mod_ocgcore_button_see;
// public GameObject mod_ocgcore_button_sum;
// public GameObject mod_ocgcore_button_spsum;
// public GameObject mod_ocgcore_button_atk;
// public GameObject mod_ocgcore_button_act;
// public GameObject mod_ocgcore_button_set;
// public GameObject mod_ocgcore_button_wait_red;
// public GameObject mod_ocgcore_button_wait_green;
// public GameObject mod_ocgcore_button_wait_blue;
// public GameObject mod_ocgcore_button_wait_black;
// public GameObject mod_ocgcore_explode_mp;
// public GameObject mod_ocgcore_explode_selected;
// public GameObject mod_ocgcore_explode_bp;
// public GameObject mod_ocgcore_explode_ep;
// public GameObject mod_ocgcore_explode_ok;
// public GameObject mod_ocgcore_explode_no;
// public GameObject mod_ocgcore_explode_change;
// public GameObject mod_ocgcore_explode_see;
// public GameObject mod_ocgcore_explode_sum;
// public GameObject mod_ocgcore_explode_spsum;
// public GameObject mod_ocgcore_explode_atk;
// public GameObject mod_ocgcore_explode_act;
// public GameObject mod_ocgcore_explode_set;
// public GameObject mod_audio_effect;
// public GameObject mod_ocgcore_card;
// public GameObject mod_ocgcore_card_cloude;
// public GameObject mod_ocgcore_overlay_light;
// public GameObject mod_ocgcore_card_number_shower;
// public GameObject mod_ocgcore_card_figure_line;
// public GameObject mod_ocgcore_hidden_button;
// public GameObject mod_ocgcore_coin;
// public GameObject mod_ocgcore_dice;
// public GameObject mod_simple_quad;
// public GameObject mod_simple_ngui_background_texture;
// public GameObject mod_simple_ngui_text;
// public GameObject mod_ocgcore_idle_container;
// public GameObject mod_ocgcore_ui_card_hint;
// public GameObject mod_ocgcore_ui_health;
// public GameObject mod_ocgcore_ui_select_chain;
// public GameObject mod_ocgcore_ui_time_effect;
// public GameObject mod_ui_debbger;
// public GameObject mod_ocgcore_number;
// public GameObject mod_ocgcore_select_positions;
// public GameObject mod_ocgcore_search_cards;
// public GameObject mod_ocgcore_select_common;
// public GameObject mod_ocgcore_select_button_option;
// public GameObject mod_ocgcore_select_text_option;
// public GameObject mod_ocgcore_decoration_chain_selecting;
// public GameObject mod_ocgcore_decoration_card_selected;
// public GameObject mod_ocgcore_decoration_card_selecting;
// public GameObject mod_ocgcore_decoration_card_active;
// public GameObject mod_ocgcore_decoration_spsummon;
// public GameObject mod_ocgcore_decoration_thunder;
// public GameObject mod_ocgcore_decoration_cage;
// public GameObject mod_ocgcore_decoration_cage_of_field;
// public GameObject mod_ocgcore_decoration_monster_activated;
// public GameObject mod_ocgcore_decoration_trap_activated;
// public GameObject mod_ocgcore_decoration_magic_activated;
// public GameObject mod_ocgcore_decoration_magic_zhuangbei;
// public GameObject mod_ocgcore_decoration_removed;
// public GameObject mod_ocgcore_decoration_tograve;
// public GameObject mod_ocgcore_decoration_card_setted;
// public GameObject mod_ocgcore_blood;
// public GameObject mod_ocgcore_blood_screen;
// public Texture2D Texture2D_card_back;
// public GameObject mod_deck_manager_card_on_list;
// public GameObject mod_deck_manager_main_bed;
// public GameObject mod_deck_manager_max_bed;
// public GameObject mod_deck_manager_card;
// public GameObject mod_deck_manager_lflist;
// public GameObject mod_deck_manager_effect;
// public GameObject mod_ocgcore_bs_atk_decoration;
// public GameObject mod_ocgcore_bs_atk_sign;
// public GameObject mod_ocgcore_bs_atk_line_earth;
// public GameObject mod_ocgcore_bs_atk_line_water;
// public GameObject mod_ocgcore_bs_atk_line_fire;
// public GameObject mod_ocgcore_bs_atk_line_wind;
// public GameObject mod_ocgcore_bs_atk_line_dark;
// public GameObject mod_ocgcore_bs_atk_line_light;
// public GameObject mod_ocgcore_cs_chaining;
// public GameObject mod_ocgcore_cs_end;
// public GameObject mod_ocgcore_cs_bomb;
// public GameObject mod_ocgcore_cs_negated;
// public GameObject mod_ocgcore_ss_summon_earth;
// public GameObject mod_ocgcore_ss_summon_water;
// public GameObject mod_ocgcore_ss_summon_fire;
// public GameObject mod_ocgcore_ss_summon_wind;
// public GameObject mod_ocgcore_ss_summon_dark;
// public GameObject mod_ocgcore_ss_summon_light;
// public GameObject mod_ocgcore_ss_spsummon_normal;
// public GameObject mod_ocgcore_ss_spsummon_ronghe;
// public GameObject mod_ocgcore_ss_spsummon_tongtiao;
// public GameObject mod_ocgcore_ss_spsummon_yishi;
// public GameObject mod_ocgcore_ss_p_idle_effect;
// public GameObject mod_ocgcore_ss_p_sum_effect;
// public GameObject mod_ocgcore_ss_dark_hole;
// public GameObject mod_room_window;
// public GameObject mod_room_ui_button;
// public GameObject mod_login_window;
// public GameObject mod_regist_window;
// public GameObject mod_dating_window;
// public GameObject mod_room_in_dating_window;
// public GameObject mod_dating_chat;
// public GameObject mod_shangcheng;
// public GameObject mod_shangcheng_queren;
// public GameObject mod_shangping;
// //最后做一下preload
// void Start () {
// client = new CLIENT(this);
// ini_mods();
// }
// void ini_mods()
// {
// preload(mod_ocgcore_button_mp);
// preload(mod_ocgcore_button_bp);
// preload(mod_ocgcore_button_ep);
// preload(mod_ocgcore_button_ok);
// preload(mod_ocgcore_button_no);
// preload(mod_ocgcore_button_change);
// preload(mod_ocgcore_button_see);
// preload(mod_ocgcore_button_sum);
// preload(mod_ocgcore_button_spsum);
// preload(mod_ocgcore_button_atk);
// preload(mod_ocgcore_button_act);
// preload(mod_ocgcore_button_set);
// preload(mod_ocgcore_button_wait_red);
// preload(mod_ocgcore_button_wait_green);
// preload(mod_ocgcore_button_wait_blue);
// preload(mod_ocgcore_button_wait_black);
// preload(mod_ocgcore_explode_mp);
// preload(mod_ocgcore_explode_selected);
// preload(mod_ocgcore_explode_bp);
// preload(mod_ocgcore_explode_ep);
// preload(mod_ocgcore_explode_ok);
// preload(mod_ocgcore_explode_no);
// preload(mod_ocgcore_explode_change);
// preload(mod_ocgcore_explode_see);
// preload(mod_ocgcore_explode_sum);
// preload(mod_ocgcore_explode_spsum);
// preload(mod_ocgcore_explode_atk);
// preload(mod_ocgcore_explode_act);
// preload(mod_ocgcore_explode_set);
// preload(mod_ocgcore_card);
// preload(mod_ocgcore_card_cloude);
// preload(mod_ocgcore_overlay_light);
// preload(mod_ocgcore_card_number_shower);
// preload(mod_ocgcore_card_figure_line);
// preload(mod_ocgcore_hidden_button);
// preload(mod_ocgcore_coin);
// preload(mod_ocgcore_dice);
// preload(mod_simple_quad);
// preload(mod_simple_ngui_background_texture);
// preload(mod_simple_ngui_text);
// preload(mod_ocgcore_idle_container);
// preload(mod_ocgcore_ui_card_hint);
// preload(mod_ocgcore_ui_health);
// preload(mod_ocgcore_ui_select_chain);
// preload(mod_ocgcore_ui_time_effect);
// preload(mod_ocgcore_number);
// preload(mod_ocgcore_select_positions);
// preload(mod_ocgcore_search_cards);
// preload(mod_ocgcore_select_common);
// preload(mod_ocgcore_select_button_option);
// preload(mod_ocgcore_select_text_option);
// preload(mod_ocgcore_decoration_chain_selecting);
// preload(mod_ocgcore_decoration_card_selected);
// preload(mod_ocgcore_decoration_card_selecting);
// preload(mod_ocgcore_decoration_card_active);
// preload(mod_ocgcore_decoration_spsummon);
// preload(mod_ocgcore_decoration_thunder);
// preload(mod_ocgcore_decoration_cage);
// preload(mod_ocgcore_decoration_cage_of_field);
// preload(mod_ocgcore_decoration_monster_activated);
// preload(mod_ocgcore_decoration_trap_activated);
// preload(mod_ocgcore_decoration_magic_activated);
// preload(mod_ocgcore_decoration_magic_zhuangbei);
// preload(mod_ocgcore_decoration_removed);
// preload(mod_ocgcore_decoration_tograve);
// preload(mod_ocgcore_decoration_card_setted);
// preload(mod_ocgcore_blood);
// preload(mod_ocgcore_blood_screen);
// preload(mod_deck_manager_card_on_list);
// preload(mod_deck_manager_main_bed);
// preload(mod_deck_manager_max_bed);
// preload(mod_deck_manager_card);
// preload(mod_deck_manager_lflist);
// preload(mod_deck_manager_effect);
// preload(mod_ocgcore_bs_atk_decoration);
// preload(mod_ocgcore_bs_atk_sign);
// preload(mod_ocgcore_bs_atk_line_earth);
// preload(mod_ocgcore_bs_atk_line_water);
// preload(mod_ocgcore_bs_atk_line_fire);
// preload(mod_ocgcore_bs_atk_line_wind);
// preload(mod_ocgcore_bs_atk_line_dark);
// preload(mod_ocgcore_bs_atk_line_light);
// preload(mod_ocgcore_cs_chaining);
// preload(mod_ocgcore_cs_end);
// preload(mod_ocgcore_cs_bomb);
// preload(mod_ocgcore_cs_negated);
// preload(mod_ocgcore_ss_summon_earth);
// preload(mod_ocgcore_ss_summon_water);
// preload(mod_ocgcore_ss_summon_fire);
// preload(mod_ocgcore_ss_summon_wind);
// preload(mod_ocgcore_ss_summon_dark);
// preload(mod_ocgcore_ss_summon_light);
// preload(mod_ocgcore_ss_spsummon_normal);
// preload(mod_ocgcore_ss_spsummon_ronghe);
// preload(mod_ocgcore_ss_spsummon_tongtiao);
// preload(mod_ocgcore_ss_spsummon_yishi);
// preload(mod_ocgcore_ss_p_idle_effect);
// preload(mod_ocgcore_ss_p_sum_effect);
// preload(mod_ocgcore_ss_dark_hole);
// }
// private List<GameObject> GameObjects = new List<GameObject>();
// void preload(GameObject g)
// {
// GameObject obj = GameObject.Instantiate(g) as GameObject;
// obj.SetActive(false);
// GameObjects.Add(obj);
// }
// bool first = true;
// void Update ()
// {
// if (first)
// {
// first = false;
// //QualitySettings.SetQualityLevel(5);
// }
// client.update();
// }
// void OnApplicationQuit()
// {
// Debug.Log("OnApplicationQuit");
// client.is_running = false;
// client.networkStream.Flush();
// client.networkStream.Close();
// client.networkStream.Dispose();
// client.networkStream = null;
// client.tcpClient.Close();
// client.tcpClient = null;
// }
//}
fileFormatVersion: 2
guid: 89103720b5148e84a8ebeb6a8372af4a
timeCreated: 1480605654
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
//using System;
//using System.Drawing;
//using System.Drawing.Imaging;
//using System.Collections.Generic;
//using System.IO;
//using System.Threading;
//using UnityEngine;
//public enum ocgcore_picture_type
//{
// card_picture = 0,
// card_verticle_drawing = 1,
// card_feature = 3,
//}
//public class PictureLoader
//{
// private CLIENT client;
// System.Object waitLoadListLock = new System.Object();
// System.Object loadedListLock = new System.Object();
// List<PictureResource> waitLoadList = new List<PictureResource>();
// List<PictureResource> loadedList = new List<PictureResource>();
// System.Collections.Generic.Dictionary<UInt64, bool> addedMap = new Dictionary<ulong, bool>();
// private class BitmapHelper
// {
// public System.Drawing.Color[,] colors = null;
// public BitmapHelper(string path)
// {
// Bitmap bitmap = (Bitmap)Image.FromFile(path);
// BitmapData bmpData = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
// IntPtr ptr = bmpData.Scan0;
// int bytes = Math.Abs(bmpData.Stride) * bitmap.Height;
// byte[] rgbValues = new byte[bytes];
// System.Runtime.InteropServices.Marshal.Copy(ptr, rgbValues, 0, bytes);
// colors = new System.Drawing.Color[bitmap.Width, bitmap.Height];
// for (int counter = 0; counter < rgbValues.Length; counter += 4)
// {
// int i_am = counter / 4;
// colors[i_am % bitmap.Width, i_am / bitmap.Width]
// =
// System.Drawing.Color.FromArgb(
// rgbValues[counter + 3],
// rgbValues[counter + 2],
// rgbValues[counter + 1],
// rgbValues[counter + 0]);
// }
// bitmap.UnlockBits(bmpData);
// bitmap.Dispose();
// }
// public System.Drawing.Color GetPixel(int a, int b)
// {
// return colors[a, b];
// }
// }
// private class PictureResource
// {
// public ocgcore_picture_type type;
// public long code;
// public byte[] data = null;
// public float[, ,] hashed_data = null;
// public PictureResource(ocgcore_picture_type t, long c)
// {
// type = t;
// code = c;
// }
// }
// public PictureLoader(CLIENT c)
// {
// client = c;
// Thread main = new Thread(thread_run);
// main.Start();
// Debug.Log("picture_loader_begin");
// }
// void thread_run()
// {
// while (client.is_running)
// {
// try
// {
// lock (waitLoadListLock)
// {
// //card_picture
// ProcessingCardPicture();
// //card_verticle_drawing
// ProcessingVerticleDrawing();
// //card_feature
// ProcessingCardFeature();
// }
// }
// catch (Exception e)
// {
// Debug.Log(e);
// }
// Thread.Sleep(2000);
// }
// }
// private void ProcessingCardFeature()
// {
// var removedList = new List<PictureResource>();
// for (int i = 0; i < waitLoadList.Count; i++)
// {
// if (waitLoadList[i].hashed_data == null)
// {
// if (waitLoadList[i].type == ocgcore_picture_type.card_feature)
// {
// if (File.Exists("picture_monster\\" + waitLoadList[i].code.ToString() + ".png"))
// {
// UsingAritificialPng(removedList, i);
// }
// else
// {
// UsingAutoPng(removedList, i);
// }
// }
// }
// }
// for (int i = 0; i < removedList.Count; i++)
// {
// waitLoadList.Remove(removedList[i]);
// }
// removedList.Clear();
// }
// private void UsingAutoPng(List<PictureResource> removedList, int i)
// {
// string path = "picture_card\\" + waitLoadList[i].code.ToString() + ".jpg";
// if (File.Exists(path))
// {
// BitmapHelper bitmap = new BitmapHelper(path);
// int width = bitmap.colors.GetLength(0);
// int height = bitmap.colors.GetLength(1);
// waitLoadList[i].hashed_data = new float[120, 120, 4];
// for (int w = 0; w < 120; w++)
// {
// for (int h = 0; h < 120; h++)
// {
// System.Drawing.Color color = bitmap.GetPixel((int)((float)(30 + w) / 177f * (float)width), (int)((float)(50 + h) / 254f * (float)height));
// float a = (float)color.A / 255f;
// if (w < 20) if (a > (float)w / (float)20) a = (float)w / (float)20;
// if (w > 100) if (a > 1f - (float)(w - 100) / (float)20) a = 1f - (float)(w - 100) / (float)20;
// if (h < 20) if (a > (float)h / (float)20) a = (float)h / (float)20;
// if (h > 100) if (a > 1f - (float)(h - 100) / (float)20) a = 1f - (float)(h - 100) / (float)20;
// waitLoadList[i].hashed_data[w, 120 - h - 1, 0] = (float)color.R / 255f;
// waitLoadList[i].hashed_data[w, 120 - h - 1, 1] = (float)color.G / 255f;
// waitLoadList[i].hashed_data[w, 120 - h - 1, 2] = (float)color.B / 255f;
// waitLoadList[i].hashed_data[w, 120 - h - 1, 3] = a;
// }
// }
// loadedList.Add(waitLoadList[i]);
// removedList.Add(waitLoadList[i]);
// }
// }
// private void UsingAritificialPng(List<PictureResource> removedList, int i)
// {
// string path = "picture_monster\\" + waitLoadList[i].code.ToString() + ".png";
// BitmapHelper bitmap = new BitmapHelper(path);
// int left;
// int right;
// int up;
// int down;
// CutTop(bitmap, out left, out right, out up, out down);
// up = CutLeft(bitmap, up);
// down = CutRight(bitmap, down);
// right = CutButton(bitmap, right);
// int width = right - left;
// int height = down - up;
// waitLoadList[i].hashed_data = new float[width, height, 4];
// for (int w = 0; w < width; w++)
// {
// for (int h = 0; h < height; h++)
// {
// System.Drawing.Color color = bitmap.GetPixel(left + w, up + h);
// float a = (float)color.A / 255f;
// if (w < 40) if (a > (float)w / (float)40) a = (float)w / (float)40;
// if (w > (width - 40)) if (a > 1f - (float)(w - (width - 40)) / (float)40) a = 1f - (float)(w - (width - 40)) / (float)40;
// if (h < 40) if (a > (float)h / (float)40) a = (float)h / (float)40;
// if (h > (height - 40)) if (a > 1f - (float)(h - (height - 40)) / (float)40) a = 1f - (float)(h - (height - 40)) / (float)40;
// waitLoadList[i].hashed_data[w, height - h - 1, 0] = (float)color.R / 255f;
// waitLoadList[i].hashed_data[w, height - h - 1, 1] = (float)color.G / 255f;
// waitLoadList[i].hashed_data[w, height - h - 1, 2] = (float)color.B / 255f;
// waitLoadList[i].hashed_data[w, height - h - 1, 3] = a;
// }
// }
// loadedList.Add(waitLoadList[i]);
// removedList.Add(waitLoadList[i]);
// }
// private static int CutButton(BitmapHelper bitmap, int right)
// {
// for (int w = bitmap.colors.GetLength(0) - 1; w >= 0; w--)
// {
// for (int h = 0; h < bitmap.colors.GetLength(1); h++)
// {
// System.Drawing.Color color = bitmap.GetPixel(w, h);
// if (color.A > 10)
// {
// right = w;
// return right;
// }
// }
// }
// return right;
// }
// private static int CutRight(BitmapHelper bitmap, int down)
// {
// for (int h = bitmap.colors.GetLength(1) - 1; h >= 0; h--)
// {
// for (int w = 0; w < bitmap.colors.GetLength(0); w++)
// {
// System.Drawing.Color color = bitmap.GetPixel(w, h);
// if (color.A > 10)
// {
// down = h;
// return down;
// }
// }
// }
// return down;
// }
// private static int CutLeft(BitmapHelper bitmap, int up)
// {
// for (int h = 0; h < bitmap.colors.GetLength(1); h++)
// {
// for (int w = 0; w < bitmap.colors.GetLength(0); w++)
// {
// System.Drawing.Color color = bitmap.GetPixel(w, h);
// if (color.A > 10)
// {
// up = h;
// return up;
// }
// }
// }
// return up;
// }
// private static void CutTop(BitmapHelper bitmap, out int left, out int right, out int up, out int down)
// {
// ///////切边算法
// left = 0;
// right = bitmap.colors.GetLength(0);
// up = 0;
// down = bitmap.colors.GetLength(1);
// for (int w = 0; w < bitmap.colors.GetLength(0); w++)
// {
// for (int h = 0; h < bitmap.colors.GetLength(1); h++)
// {
// System.Drawing.Color color = bitmap.GetPixel(w, h);
// if (color.A > 10)
// {
// left = w;
// return;
// }
// }
// }
// }
// private void ProcessingVerticleDrawing()
// {
// var removedList = new List<PictureResource>();
// for (int i = 0; i < waitLoadList.Count; i++)
// {
// if (waitLoadList[i].type == ocgcore_picture_type.card_verticle_drawing)
// {
// string path = "picture_card\\" + waitLoadList[i].code.ToString() + ".jpg";
// if (!File.Exists(path))
// {
// continue;
// }
// BitmapHelper bitmap = new BitmapHelper(path);
// int width = bitmap.colors.GetLength(0);
// int height = bitmap.colors.GetLength(1);
// waitLoadList[i].hashed_data = new float[120, 120, 4];
// for (int w = 0; w < 120; w++)
// {
// for (int h = 0; h < 120; h++)
// {
// System.Drawing.Color color = bitmap.GetPixel((int)((float)(30 + w) / 177f * (float)width), (int)((float)(50 + h) / 254f * (float)height));
// float a = (float)color.A / 255f;
// if (h < 60)
// {
// if (w < 20) if (a > (float)w / (float)20) a = (float)w / (float)20;
// if (w > 100) if (a > 1f - (float)(w - 100) / (float)20) a = 1f - (float)(w - 100) / (float)20;
// if (h < 20) if (a > (float)h / (float)20) a = (float)h / (float)20;
// if (h > 100) if (a > 1f - (float)(h - 100) / (float)20) a = 1f - (float)(h - 100) / (float)20;
// }
// else
// {
// float l = (float)Math.Sqrt((60 - w) * (60 - w) + (60 - h) * (60 - h));
// float aaa = 1.0f - (l / 60);
// if (aaa < 0) { a = 0; }
// else
// {
// if (aaa > 0.4) aaa = 1;
// else aaa = (aaa) / 0.4f;
// a = aaa;
// }
// }
// waitLoadList[i].hashed_data[w, 120 - h - 1, 0] = (float)color.R / 255f;
// waitLoadList[i].hashed_data[w, 120 - h - 1, 1] = (float)color.G / 255f;
// waitLoadList[i].hashed_data[w, 120 - h - 1, 2] = (float)color.B / 255f;
// waitLoadList[i].hashed_data[w, 120 - h - 1, 3] = a;
// }
// }
// loadedList.Add(waitLoadList[i]);
// removedList.Add(waitLoadList[i]);
// }
// }
// for (int i = 0; i < removedList.Count; i++)
// {
// waitLoadList.Remove(removedList[i]);
// }
// removedList.Clear();
// }
// private void ProcessingCardPicture()
// {
// var removedList = new List<PictureResource>();
// foreach (var val in waitLoadList)
// {
// if (val.type == ocgcore_picture_type.card_picture)
// {
// string path = "picture_card\\" + val.code.ToString() + ".jpg";
// if (!File.Exists(path))
// {
// path = "picture_card\\0.jpg";
// }
// byte[] data;
// using (FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read))
// {
// file.Seek(0, SeekOrigin.Begin);
// data = new byte[file.Length];
// file.Read(data, 0, (int)file.Length);
// }
// val.data = data;
// loadedList.Add(val);
// removedList.Add(val);
// }
// }
// for (int i = 0; i < removedList.Count; i++)
// {
// waitLoadList.Remove(removedList[i]);
// }
// removedList.Clear();
// }
// public Texture2D get(long code, ocgcore_picture_type type)
// {
// lock (loadedListLock)
// {
// foreach (PictureResource r in loadedList)
// {
// if (r.type == type)
// {
// if (r.code == code)
// {
// Texture2D re = null;
// if (r.data != null)
// {
// re = new Texture2D(400, 600);
// re.LoadImage(r.data);
// return re;
// }
// if (r.hashed_data != null)
// {
// int width = r.hashed_data.GetLength(0);
// int height = r.hashed_data.GetLength(1);
// re = new Texture2D(width, height);
// for (int w = 0; w < width; w++)
// {
// for (int h = 0; h < height; h++)
// {
// re.SetPixel(w, h, new UnityEngine.Color(r.hashed_data[w, h, 0], r.hashed_data[w, h, 1], r.hashed_data[w, h, 2], r.hashed_data[w, h, 3]));
// }
// }
// re.Apply();
// return re;
// }
// }
// }
// }
// }
// lock (waitLoadListLock)
// {
// if (!addedMap.ContainsKey((UInt64)type << 32 | (UInt64)code))
// {
// waitLoadList.Add(new PictureResource(type, code));
// addedMap.Add((UInt64)type << 32 | (UInt64)code, true);
// }
// }
// return null;
// }
//}
fileFormatVersion: 2
guid: 7c2075ecc16bdb54b917575d16794398
timeCreated: 1480605653
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System;
using System.Collections.Generic;
using UnityEngine;
public class string_reader
{
class string_hash
{
public string father = "";
public int id = 0;
public string content = "";
}
List<string_hash> strs = new List<string_hash>();
public int get_int(string str)
{
int return_value = 0;
if(str.Length>2&&str.Substring(0,2)=="0x"){
return_value = Convert.ToInt32(str,16);
}
else
{
return_value = Int32.Parse(str);
}
return return_value;
}
public string_reader(string path)
{
string text = System.IO.File.ReadAllText(path);
string st = text.Replace("\r", "");
string[] lines = st.Split(new string[] { "\n" }, StringSplitOptions.RemoveEmptyEntries);
foreach (string line in lines)
{
if (line.Length>1&&line.Substring(0,1)=="!")
{
string[] mats = line.Substring(1, line.Length-1).Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
if (mats.Length > 2)
{
string_hash a = new string_hash();
a.father = mats[0];
try
{
a.id = get_int(mats[1]);
}catch(Exception e){
Debug.Log(e);
}
a.content = mats[2];
strs.Add(a);
if (a.id==1160)
{
Debug.Log(a.content);
}
}
}
}
}
public string get(string father,int id)
{
string re = "";
foreach (string_hash s in strs)
{
if(s.father==father&&s.id==id){
re = s.content;
}
}
return re;
}
}
fileFormatVersion: 2
guid: a11211d5ee383a8479ecca7d7e220cdf
timeCreated: 1480605656
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System;
using System.IO;
using UnityEngine;
public class ui_helper
{
public static Vector2 get_hang_lie(int index, int meihangdegeshu)
{
Vector2 return_value = Vector2.zero;
return_value.x = (int)index / meihangdegeshu;
return_value.y = index % meihangdegeshu;
return return_value;
}
public static int get_zuihouyihangdegeshu(int zongshu,int meihangdegeshu)
{
int re = 0;
re = zongshu % meihangdegeshu;
if (re==0)
{
re = meihangdegeshu;
}
return re;
}
public static bool get_shifouzaizuihouyihang(int zongshu, int meihangdegeshu,int index)
{
return (int)((index) / meihangdegeshu) == (int)(zongshu / meihangdegeshu);
}
public static int get_zonghangshu(int zongshu, int meihangdegeshu)
{
return ((int)(zongshu - 1) / meihangdegeshu) + 1;
}
public static Vector3 get_close(Vector3 input_vector,Camera cam,float l)
{
Vector3 o = Vector3.zero;
Vector3 scr = cam.WorldToScreenPoint(input_vector);
scr.z -= l;
o = cam.ScreenToWorldPoint(scr);
return o;
}
public static Texture2D get_rand_face()
{
DirectoryInfo TheFolder = new DirectoryInfo("face");
FileInfo[] fileInfo = TheFolder.GetFiles();
FileInfo NextFile;
Texture2D tex = new Texture2D(400, 600);
if (fileInfo.Length > 0)
{
NextFile = fileInfo[UnityEngine.Random.Range(0, fileInfo.Length)];
byte[] data;
using (FileStream file = new FileStream(NextFile.FullName, FileMode.Open, FileAccess.Read))
{
file.Seek(0, SeekOrigin.Begin);
data = new byte[file.Length];
file.Read(data, 0, (int)file.Length);
}
tex.LoadImage(data);
}
return tex;
}
}
fileFormatVersion: 2
guid: d53d6189fd0c71342a84342e7dc83c27
timeCreated: 1480605664
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment