void Start() { data = GetComponent <MysqlScript>(); m_player = new PlayerConfig(); m_player = data.GetPlayer(0); //gold lvl attack weaponnormlname m_player.Int_Attack = 10f; m_player.Int_MaxLife = m_player.int_Lvl * 20; Debug.Log("Int_MaxLife" + m_player.Int_MaxLife); m_player.weapon_Normal = m_Weapon[0].weapon_prefab; m_player.weapon_Storing = m_Weapon[6].weapon_prefab; m_player.weapon_Special = m_Weapon[5].weapon_prefab; int_NowMapLevel = 1; Gamelvl = new int[16]; for (int i = 0; i < 16; i++) { Gamelvl[i] = 0; } for (int i = 0; i <= 1; i++) { Gamelvl[i] = 1; } if (m_StaticVal.DisFrame == true) { GetComponent <Frame>().show = true; } }
public IrcScript(IrcConection connection, Form1 main) { this.energy.BuildStandartLibary(); new DefaultScript(this.energy); this.connection = connection; this.main = main; this.energy.CreateVariable("_identify", EcmaValue.String(connection.GetIdentify())); this.energy.CreateVariable("sendAction", EcmaValue.Object(new NativeFunctionInstance(2, State, SendAction))); this.energy.CreateVariable("on", EcmaValue.Object(new NativeFunctionInstance(2, State, On))); this.energy.CreateVariable("action", EcmaValue.Object(new NativeFunctionInstance(2, State, _Action))); this.energy.CreateVariable("privmsg", EcmaValue.Object(new NativeFunctionInstance(2, State, Privmsg))); this.energy.CreateVariable("myNick", EcmaValue.Object(new NativeFunctionInstance(0, State, MyNick))); this.energy.CreateVariable("isPm", EcmaValue.Object(new NativeFunctionInstance(1, State, IsPM))); this.energy.CreateVariable("join", EcmaValue.Object(new NativeFunctionInstance(1, State, Join))); this.energy.CreateVariable("whois", EcmaValue.Object(new NativeFunctionInstance(1, State, Whois))); this.energy.CreateVariable("sleep", EcmaValue.Object(new NativeFunctionInstance(1, State, Sleep))); MysqlScript.Init(energy); energy.RunCode(new StreamReader(File.OpenRead("script.js"))); }