// Use this for initialization void Awake() { playerLives = 3; Time.timeScale = 1; restartTimer = Time.time + 5.5f; hud = GameObject.FindObjectOfType <PlayerHUD>(); player = GameObject.FindObjectOfType <PlayerMan>(); stopWatch = GameObject.FindObjectOfType <StopWatchManager>(); timeSubmit = GameObject.FindObjectOfType <TimeSaveController>(); if (playerName == null) { playerName = "tester"; } //Debug.Log("Game Manager Loaded"); //InputMap jump = (KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("jumpKey", "Space")); attack = (KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("attackKey", "F")); left = (KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("leftKey", "A")); right = (KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("rightKey", "D")); setIce = (KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("iceKey", "Alpha3")); setFire = (KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("fireKey", "Alpha2")); setArcane = (KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("arcaneKey", "Alpha1")); pause = (KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("pauseKey", "Escape")); }
public static void Create() { if (instance == null) { instance = new PlayerMan(); } }
// Use this for initialization void Start () { if (null == levelController) { levelController = new LevelLogic(); levelController.createEmptyLevel(16, 16); } playerController = GetComponent<PlayerMan>(); if(LevelManager.isActive()){ levelDescription = LevelManager.getCurrentLevel(); } /* Windows-proofing the text. We assume no OS9 or earlier. *crosses fingers* */ string csvText = levelDescription.text.Replace("\r", ""); var lineNumber = 0; var columnNumber = 0; foreach (string line in csvText.Split('\n')) { columnNumber = 0; foreach (string column in line.Split(',')) { addTile(columnNumber, lineNumber, column); ++columnNumber; } ++lineNumber; } GameObject.FindGameObjectWithTag("MainCamera").transform.position = new Vector3(columnNumber / 2 * gridSize, -lineNumber / 2 * gridSize, -3); GameObject.FindGameObjectWithTag("MainCamera").GetComponent<Camera>().orthographicSize = Math.Max((float)columnNumber / 2 * gridSize / 16 * 9, (float)lineNumber / 2 * gridSize); }
public static void SetTeamMembers() { blueTeamMembers = new Queue <string>(); redTeamMembers = new Queue <string>(); PlayerMan p = PlayerMan.inst; MatchSetting settings = GlobalWork.inst.MatchSetting; //Set the team members for (int i = 0; i < 8; i++) { Player plObj = PlayerMan.inst.GetPlObj(i); if (!plObj) { continue; } if (plObj.isIntruder) { continue; } //This match type cannot include Seconds, so we override the initial setting here. settings.matchWrestlerInfo[i].isSecond = false; if (i < 4) { blueTeamMembers.Enqueue(DataBase.GetWrestlerFullName(plObj.WresParam)); } else { redTeamMembers.Enqueue(DataBase.GetWrestlerFullName(plObj.WresParam)); } } }
void Awake() { GameManagerProper game = Object.FindObjectOfType <GameManagerProper>(); player = Object.FindObjectOfType <PlayerMan>(); Lives(); }
//Old Remove once other works void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player") { playerMan = other.gameObject.GetComponent <PlayerMan>(); playerMan.Exit(); } }
void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player") { playerMan = other.gameObject.GetComponent <PlayerMan>(); playerMan.ReturnHealth(health); Destroy(gameObject); } }
//Damage Player void OnTriggerStay2D(Collider2D other) { if (other.tag == "Player" && nextDamage < Time.time) { playerMan = other.gameObject.GetComponent <PlayerMan>(); playerMan.TakeDamage(damage); nextDamage = Time.time + damageRate; KnockBack(other.transform); } }
public override void SceneLoadLocalDone(string map, IProtocolToken token) { if (!BoltNetwork.IsClient) { currentPlayer = BoltNetwork.Instantiate(BoltPrefabs.NetworkPlayer, PlayerInstance.instance.transform.position, Quaternion.identity); var log = PlayerMan.Create(); log.Players = currentPlayer; log.Send(); } }
public override void SceneLoadRemoteDone(BoltConnection connection, IProtocolToken token) { if (!BoltNetwork.IsServer) { currentPlayer = BoltNetwork.Instantiate(BoltPrefabs.NetworkPlayer, PlayerInstance.instance.transform.position, Quaternion.identity); var log = PlayerMan.Create(); log.Players = currentPlayer; log.Send(); } }
private void button1_Click(object sender, EventArgs e) { try { GeneralComponents.ReplaceCriticalImage(PlayerMan.GetInst().PlObj[0]); } catch (Exception exception) { L.D("Force Critical Error: " + exception); } }
public void OnCollisionEnter(Collision collision) { PlayerMan pMan = collision.collider.GetComponent <PlayerMan>(); if (pMan) { audioObject.Collect(collectType); pMan.CollectIngredient(collectType); Destroy(gameObject); } }
void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player") { playerMan = other.GetComponent <PlayerMan>(); playerMan.ZeroHealth(); if (Grid.gameManagerProper.playerLives == 0) { playerMan.KillPlayer(); } } else { Destroy(other.gameObject); } }
public override void Notify() { Ship pShip = (Ship)this.pSubject.pObjA; Bomb pBomb = (Bomb)this.pSubject.pObjB; if (pBomb.bMarkForDeath == false) { pBomb.bMarkForDeath = true; pBomb.Remove(); } Player pPlayer = pShip.pPlayer; pPlayer.nLives--; //--------------------------------------------------------------------------------------------------------- // Scene Transition //--------------------------------------------------------------------------------------------------------- if (pPlayer.nLives == 0 && pPlayer.n == 1 && PlayerMan.nPlayers == 2) { // Switch players PlayerMan.WriteHighScores(); PlayerMan.SetCurrentPlayer(2); SceneContext.GetState().Initialize(); SceneContext.SetState(SceneContext.Scene.MultiPlay); return; } else if (pPlayer.nLives == 0 && pPlayer.n == PlayerMan.nPlayers) { // Game OVER PlayerMan.WriteHighScores(); SceneContext.SetState(SceneContext.Scene.Over); return; } Font pFont = FontMan.Find(Font.Name.NumLives1); pFont.Set(Font.Name.NumLives1, pShip.pPlayer.nLives.ToString(), Glyph.Name.Consolas20pt, 15, 15); Ship pShipInactive = (Ship)GameObjectMan.Find(GameObject.Name.ShipInactive); if (pShipInactive.bMarkForDeath == false) { pShipInactive.bMarkForDeath = true; pShipInactive.RemoveInactiveShip(); } }
public static void SetLosers(int startIndex, PlayerMan p) { try { for (int i = startIndex; i < startIndex + 4; i++) { if (p.GetPlObj(i)) { p.GetPlObj(i).isLoseAndStop = true; } } } catch { return; } }
void Update() { if (hud == null) { hud = GameObject.FindObjectOfType <PlayerHUD>(); Debug.Log(hud); } if (player == null) { player = GameObject.FindObjectOfType <PlayerMan>(); } if (timeSubmit == null) { timeSubmit = GameObject.FindObjectOfType <TimeSaveController>(); } timeSaved = stopWatch.time; //Debug.Log(timeSaved); }
public override void LoadContent() { //--------------------------------------------------------------------------------------------------------- // Setup Managers - once here //--------------------------------------------------------------------------------------------------------- TimerMan.Create(3, 1); TextureMan.Create(1, 1); TextureMan.Add(Texture.Name.Aliens, "Aliens.tga"); TextureMan.Add(Texture.Name.Birds, "Birds_N_Shield.tga"); TextureMan.Add(Texture.Name.Birds2, "Birds_N_Shield.tga"); //--------------------------------------------------------------------------------------------------------- // Sounds //--------------------------------------------------------------------------------------------------------- SoundMan.Create(); SoundMan.Add(Sound.Name.Explode, "explosion.wav"); SoundMan.Add(Sound.Name.Shoot, "shoot.wav"); SoundMan.Add(Sound.Name.Invader1, "fastinvader1.wav"); SoundMan.Add(Sound.Name.Invader2, "fastinvader2.wav"); SoundMan.Add(Sound.Name.Invader3, "fastinvader3.wav"); SoundMan.Add(Sound.Name.Invader4, "fastinvader4.wav"); SoundMan.Add(Sound.Name.InvaderKilled, "invaderkilled.wav"); SoundMan.Add(Sound.Name.UFOLow, "ufo_lowpitch.wav"); SoundMan.Add(Sound.Name.UFOHigh, "ufo_highpitch.wav"); ImageMan.Create(5, 2); ImageMan.Add(Image.Name.Default, Texture.Name.Aliens, new Azul.Rect(0, 0, 0, 0)); ImageMan.Add(Image.Name.NullObject, Texture.Name.Aliens, new Azul.Rect(0, 0, 0, 0)); GameSpriteMan.Create(25, 5); BoxSpriteMan.Create(25, 5); SpriteBatchMan.Create(5, 2); ProxySpriteMan.Create(10, 1); GameObjectMan.Create(50, 5); ColPairMan.Create(25, 5); GlyphMan.Create(5, 2); FontMan.Create(5, 2); ShipMan.Create(); PlayerMan.Create(); SceneContext.Create(); }
public static bool SetVictoryConditions() { if (!isIronMan) { return(false); } else { Referee matchRef = RefereeMan.inst.GetRefereeObj(); MatchMain main = MatchMain.inst; if (main.isTimeUp) { endMatch = true; main.isMatchEnd = true; matchRef.PlDir = PlDirEnum.Left; matchRef.ReqRefereeAnm(BasicSkillEnum.Refe_Stand_MatchEnd_Front_Left); matchRef.State = RefeStateEnum.DeclareVictory; Announcer.inst.PlayGong_MatchEnd(); //Determine the winner PlayerMan p = PlayerMan.inst; if (wins[0] > wins[1]) { global::MatchEvaluation.inst.ResultType = global::MatchResultEnum.KO; matchRef.SentenceLose(p.GetPlObj(4).PlIdx); SetLosers(4, p); } else if (wins[0] < wins[1]) { global::MatchEvaluation.inst.ResultType = global::MatchResultEnum.KO; matchRef.SentenceLose(p.GetPlObj(0).PlIdx); SetLosers(0, p); } return(true); } else { return(false); } } }
public static void LoadAttire() { GlobalWork gw = GlobalWork.inst; PlayerMan pm = PlayerMan.inst; SaveData saveData = SaveData.inst; for (int pl = 0; pl < 8; pl++) { needsToChangeToMatchAttire[pl] = false; if (gw.MatchSetting.matchWrestlerInfo[pl].entry) { plObj = pm.GetPlObj(pl); //string[] list = Directory.GetFiles("./AceModsData/AttireExtension/", DataBase.GetWrestlerFullName(plObj.WresParam) + "*.*"); DirectoryInfo di = new DirectoryInfo("./AceModsData/AttireExtension/"); FileInfo[] files = di.GetFiles(DataBase.GetWrestlerFullName(plObj.WresParam) + "*.cos"); if (files.Length > 0) { //MessageBox.Show(files.Length.ToString()); Attire_Select attireSelect = new Attire_Select(files, pl); attireSelect.ShowDialog(); if (File.Exists("./AceModsData/AttireExtension/" + DataBase.GetWrestlerFullName(plObj.WresParam) + attireSelect.chosenAttire + ".cos")) { StreamReader cdReader = new StreamReader("./AceModsData/AttireExtension/" + DataBase.GetWrestlerFullName(plObj.WresParam) + attireSelect.chosenAttire + ".cos"); CostumeData loadedCostumeData = new CostumeData(); while (cdReader.Peek() != -1) { loadedCostumeData.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { loadedCostumeData.layerTex[i, j] = cdReader.ReadLine(); loadedCostumeData.color[i, j].r = float.Parse(cdReader.ReadLine()); loadedCostumeData.color[i, j].g = float.Parse(cdReader.ReadLine()); loadedCostumeData.color[i, j].b = float.Parse(cdReader.ReadLine()); loadedCostumeData.color[i, j].a = float.Parse(cdReader.ReadLine()); loadedCostumeData.highlightIntensity[i, j] = float.Parse(cdReader.ReadLine()); } loadedCostumeData.partsScale[i] = float.Parse(cdReader.ReadLine()); } entAttire = cdReader.ReadLine(); } cdReader.Dispose(); cdReader.Close(); bool check = false; if (!String.IsNullOrEmpty(entAttire)) { if (gw.MatchSetting.BattleRoyalKind != BattleRoyalKindEnum.RoyalRumble) { if (!gw.MatchSetting.isSkipEntranceScene) { if (gw.MatchSetting.arena != VenueEnum.BarbedWire && gw.MatchSetting.arena != VenueEnum.Cage && gw.MatchSetting.arena != VenueEnum.Dodecagon && gw.MatchSetting.arena != VenueEnum.Dojo && gw.MatchSetting.arena != VenueEnum.LandMine_BarbedWire && gw.MatchSetting.arena != VenueEnum.LandMine_FluorescentLamp && gw.MatchSetting.arena != VenueEnum.YurakuenHall) { check = true; } } } } if (check) { needsToChangeToMatchAttire[pl] = true; StreamReader cdReader2 = new StreamReader("./AceModsData/AttireExtension/" + entAttire + ".cos"); CostumeData loadedCostumeDataEnt = new CostumeData(); while (cdReader2.Peek() != -1) { loadedCostumeDataEnt.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { loadedCostumeDataEnt.layerTex[i, j] = cdReader2.ReadLine(); loadedCostumeDataEnt.color[i, j].r = float.Parse(cdReader2.ReadLine()); loadedCostumeDataEnt.color[i, j].g = float.Parse(cdReader2.ReadLine()); loadedCostumeDataEnt.color[i, j].b = float.Parse(cdReader2.ReadLine()); loadedCostumeDataEnt.color[i, j].a = float.Parse(cdReader2.ReadLine()); loadedCostumeDataEnt.highlightIntensity[i, j] = float.Parse(cdReader2.ReadLine()); } loadedCostumeDataEnt.partsScale[i] = float.Parse(cdReader2.ReadLine()); } } try { plObj.FormRen.DestroySprite(); plObj.FormRen.InitTexture(loadedCostumeDataEnt); for (int i = 0; i < 9; i++) { plObj.FormRen.partsScale[i] = loadedCostumeDataEnt.partsScale[i]; } plObj.FormRen.InitSprite(false); L.D("ATTIRE EXTENSION: ATTIRE CHANGED TO ENTRANCE ATTIRE"); } catch { L.D("ATTIRE EXTENSION: ATTIRE NOT CHANGED TO ENTRANCE ATTIRE"); MatchWrestlerInfo w = GlobalWork.inst.MatchSetting.matchWrestlerInfo[plObj.PlIdx]; plObj.FormRen.InitTexture(SaveData.GetInst().GetEditWrestlerData(w.wrestlerID).appearanceData.costumeData[w.costume_no]); plObj.FormRen.InitSprite(false); needsToChangeToMatchAttire[pl] = false; } if (pl == 0) { cosDat1.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { cosDat1.layerTex[i, j] = loadedCostumeData.layerTex[i, j]; cosDat1.color[i, j].r = loadedCostumeData.color[i, j].r; cosDat1.color[i, j].g = loadedCostumeData.color[i, j].g; cosDat1.color[i, j].b = loadedCostumeData.color[i, j].b; cosDat1.color[i, j].a = loadedCostumeData.color[i, j].a; cosDat1.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j]; } cosDat1.partsScale[i] = loadedCostumeData.partsScale[i]; } } else if (pl == 1) { cosDat2.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { cosDat2.layerTex[i, j] = loadedCostumeData.layerTex[i, j]; cosDat2.color[i, j].r = loadedCostumeData.color[i, j].r; cosDat2.color[i, j].g = loadedCostumeData.color[i, j].g; cosDat2.color[i, j].b = loadedCostumeData.color[i, j].b; cosDat2.color[i, j].a = loadedCostumeData.color[i, j].a; cosDat2.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j]; } cosDat2.partsScale[i] = loadedCostumeData.partsScale[i]; } } else if (pl == 2) { cosDat3.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { cosDat3.layerTex[i, j] = loadedCostumeData.layerTex[i, j]; cosDat3.color[i, j].r = loadedCostumeData.color[i, j].r; cosDat3.color[i, j].g = loadedCostumeData.color[i, j].g; cosDat3.color[i, j].b = loadedCostumeData.color[i, j].b; cosDat3.color[i, j].a = loadedCostumeData.color[i, j].a; cosDat3.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j]; } cosDat3.partsScale[i] = loadedCostumeData.partsScale[i]; } } else if (pl == 3) { cosDat4.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { cosDat4.layerTex[i, j] = loadedCostumeData.layerTex[i, j]; cosDat4.color[i, j].r = loadedCostumeData.color[i, j].r; cosDat4.color[i, j].g = loadedCostumeData.color[i, j].g; cosDat4.color[i, j].b = loadedCostumeData.color[i, j].b; cosDat4.color[i, j].a = loadedCostumeData.color[i, j].a; cosDat4.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j]; } cosDat4.partsScale[i] = loadedCostumeData.partsScale[i]; } } else if (pl == 4) { cosDat5.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { cosDat5.layerTex[i, j] = loadedCostumeData.layerTex[i, j]; cosDat5.color[i, j].r = loadedCostumeData.color[i, j].r; cosDat5.color[i, j].g = loadedCostumeData.color[i, j].g; cosDat5.color[i, j].b = loadedCostumeData.color[i, j].b; cosDat5.color[i, j].a = loadedCostumeData.color[i, j].a; cosDat5.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j]; } cosDat5.partsScale[i] = loadedCostumeData.partsScale[i]; } } else if (pl == 5) { cosDat6.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { cosDat6.layerTex[i, j] = loadedCostumeData.layerTex[i, j]; cosDat6.color[i, j].r = loadedCostumeData.color[i, j].r; cosDat6.color[i, j].g = loadedCostumeData.color[i, j].g; cosDat6.color[i, j].b = loadedCostumeData.color[i, j].b; cosDat6.color[i, j].a = loadedCostumeData.color[i, j].a; cosDat6.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j]; } cosDat6.partsScale[i] = loadedCostumeData.partsScale[i]; } } else if (pl == 6) { cosDat7.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { cosDat7.layerTex[i, j] = loadedCostumeData.layerTex[i, j]; cosDat7.color[i, j].r = loadedCostumeData.color[i, j].r; cosDat7.color[i, j].g = loadedCostumeData.color[i, j].g; cosDat7.color[i, j].b = loadedCostumeData.color[i, j].b; cosDat7.color[i, j].a = loadedCostumeData.color[i, j].a; cosDat7.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j]; } cosDat7.partsScale[i] = loadedCostumeData.partsScale[i]; } } else if (pl == 7) { cosDat8.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { cosDat8.layerTex[i, j] = loadedCostumeData.layerTex[i, j]; cosDat8.color[i, j].r = loadedCostumeData.color[i, j].r; cosDat8.color[i, j].g = loadedCostumeData.color[i, j].g; cosDat8.color[i, j].b = loadedCostumeData.color[i, j].b; cosDat8.color[i, j].a = loadedCostumeData.color[i, j].a; cosDat8.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j]; } cosDat8.partsScale[i] = loadedCostumeData.partsScale[i]; } } } else { try { plObj.FormRen.DestroySprite(); plObj.FormRen.InitTexture(loadedCostumeData); for (int i = 0; i < 9; i++) { plObj.FormRen.partsScale[i] = loadedCostumeData.partsScale[i]; } plObj.FormRen.InitSprite(false); L.D("ATTIRE EXTENSION: ATTIRE CHANGED"); } catch { L.D("ATTIRE EXTENSION: ATTIRE NOT CHANGED"); MatchWrestlerInfo w = GlobalWork.inst.MatchSetting.matchWrestlerInfo[plObj.PlIdx]; plObj.FormRen.InitTexture(SaveData.GetInst().GetEditWrestlerData(w.wrestlerID).appearanceData.costumeData[w.costume_no]); plObj.FormRen.InitSprite(false); } } } attireSelect.Dispose(); } } } }
private void ImportAttire(int cos) { GlobalWork gw = GlobalWork.inst; PlayerMan pm = PlayerMan.inst; saveData = SaveData.inst; int id = listBox1.SelectedIndex; string plObjname = DataBase.GetWrestlerFullName(saveData.editWrestlerData[listBox1.SelectedIndex].wrestlerParam); CostumeData plObjCos = saveData.editWrestlerData[listBox1.SelectedIndex].appearanceData.costumeData[cos]; OpenFileDialog fileDialog = new OpenFileDialog(); fileDialog.Filter = "COSTUME Files (*.cos)|*.cos"; fileDialog.InitialDirectory = "./AceModsData/AttireExtension/"; if (fileDialog.ShowDialog() == DialogResult.OK) { DialogResult dialogResult = MessageBox.Show("Overwrite in-game attire " + (cos + 1) + " with " + fileDialog.FileName + "? Are you certain? There is no undoing this.", "Please confirm your action.", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { StreamReader cdReader = new StreamReader(fileDialog.FileName); CostumeData loadedCostumeData = new CostumeData(); while (cdReader.Peek() != -1) { loadedCostumeData.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { loadedCostumeData.layerTex[i, j] = cdReader.ReadLine(); loadedCostumeData.color[i, j].r = float.Parse(cdReader.ReadLine()); loadedCostumeData.color[i, j].g = float.Parse(cdReader.ReadLine()); loadedCostumeData.color[i, j].b = float.Parse(cdReader.ReadLine()); loadedCostumeData.color[i, j].a = float.Parse(cdReader.ReadLine()); loadedCostumeData.highlightIntensity[i, j] = float.Parse(cdReader.ReadLine()); } loadedCostumeData.partsScale[i] = float.Parse(cdReader.ReadLine()); } string test = cdReader.ReadLine(); } try { plObjCos.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { plObjCos.layerTex[i, j] = loadedCostumeData.layerTex[i, j]; plObjCos.color[i, j].r = loadedCostumeData.color[i, j].r; plObjCos.color[i, j].g = loadedCostumeData.color[i, j].g; plObjCos.color[i, j].b = loadedCostumeData.color[i, j].b; plObjCos.color[i, j].a = loadedCostumeData.color[i, j].a; plObjCos.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j]; } plObjCos.partsScale[i] = loadedCostumeData.partsScale[i]; } //plObjCos = loadedCostumeData; L.D("ATTIRE EXTENSION: ATTIRE IMPORTED TO ATTIRE SLOT " + cos); } catch { L.D("ATTIRE EXTENSION: ATTIRE NOT IMPORTED"); } cdReader.Dispose(); cdReader.Close(); } else { return; } } }
public override void OnEvent(PlayerMan evnt) { players.Add(evnt.Players); Debug.Log(players.Count); }
private void Awake() { instance = this; }
void Awake() { instance = this; }
public static void SetTeamNames() { PlayerMan p = PlayerMan.inst; int playerCount = MatchConfiguration.GetPlayerCount(); //Set-up if only two wrestlers exist if (playerCount == 2) { teamNames[0] = DataBase.GetWrestlerFullName(PlayerMan.inst.GetPlObj(0).WresParam); teamNames[1] = DataBase.GetWrestlerFullName(PlayerMan.inst.GetPlObj(4).WresParam); return; } //Set-up for if multi-man teams exist try { //Get Team One Members List <String> wrestlers = new List <String>(); wrestlers.Clear(); for (int i = 0; i < 4; i++) { Player plObj = PlayerMan.inst.GetPlObj(i); if (!plObj) { continue; } if (!plObj.isSecond && !plObj.isSleep && !plObj.isIntruder) { wrestlers.Add(DataBase.GetWrestlerFullName(plObj.WresParam)); } } //Determine if a team is necessary if (wrestlers.Count == 1) { teamNames[0] = wrestlers[0]; } else { teamNames[0] = MatchConfiguration.GetTeamName(wrestlers, SideCornerPostEnum.Left); } //Get Team Two Members wrestlers.Clear(); for (int i = 4; i < 8; i++) { Player plObj = PlayerMan.inst.GetPlObj(i); if (!plObj) { continue; } if (!plObj.isSecond && !plObj.isSleep && !plObj.isIntruder) { wrestlers.Add(DataBase.GetWrestlerFullName(plObj.WresParam)); } } //Determine if a team is necessary if (wrestlers.Count == 1) { teamNames[1] = wrestlers[0]; } else { teamNames[1] = MatchConfiguration.GetTeamName(wrestlers, SideCornerPostEnum.Right); } } catch { teamNames[0] = "Blue Team"; teamNames[1] = "Red Team"; } }
public static void PreMatchTaunts() { if (!tauntCheck) { MatchMain mm = MatchMain.inst; if (mm.isTimeCounting) { PlayerMan pm = PlayerMan.inst; Player p1 = pm.GetPlObj(0); Player p2 = pm.GetPlObj(4); if (p1 == null || p2 == null) { return; } string p1name = DataBase.GetWrestlerFullName(p1.WresParam); string p2name = DataBase.GetWrestlerFullName(p2.WresParam); if (tauntList.Contains(p1name) && tauntList.Contains(p2name)) { int edit1TauntNo = tauntDat[tauntList.IndexOf(p1name)]; int edit2TauntNo = tauntDat[tauntList.IndexOf(p2name)]; SkillSlotEnum skill1 = new SkillSlotEnum(); SkillSlotEnum skill2 = new SkillSlotEnum(); // EDIT 1 TAUNT if (edit1TauntNo == 5) { skill1 = SkillSlotEnum.Performance_Enter; } else if (edit1TauntNo == 1) { skill1 = SkillSlotEnum.Performance_1; } else if (edit1TauntNo == 2) { skill1 = SkillSlotEnum.Performance_2; } else if (edit1TauntNo == 3) { skill1 = SkillSlotEnum.Performance_3; } else if (edit1TauntNo == 4) { skill1 = SkillSlotEnum.Performance_4; } // EDIT 2 TAUNT if (edit2TauntNo == 5) { skill2 = SkillSlotEnum.Performance_Enter; } else if (edit2TauntNo == 1) { skill2 = SkillSlotEnum.Performance_1; } else if (edit2TauntNo == 2) { skill2 = SkillSlotEnum.Performance_2; } else if (edit2TauntNo == 3) { skill2 = SkillSlotEnum.Performance_3; } else if (edit2TauntNo == 4) { skill2 = SkillSlotEnum.Performance_4; } p1.animator.StartSlotAnm_Immediately(skill1, 0, true, p1.TargetPlIdx); p2.animator.StartSlotAnm_Immediately(skill2, 0, true, p2.TargetPlIdx); tauntCheck = true; } } } }