// Use this for initialization void Start() { ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); OPProjectile = GameObject.Find("ObjectPoolerSachelShrap").GetComponent <ObjectPoolScript> (); OPTrail = GameObject.Find("ObjectPoolerTrailS").GetComponent <ObjectPoolScript> (); }
// Use this for initialization void Start() { ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); OPProjectile = GameObject.Find("ObjectPoolerGrenadeShrap").GetComponent <ObjectPoolScript> (); OPTrail = GameObject.Find("ObjectPoolerTrailS").GetComponent <ObjectPoolScript> (); Trail = Resources.Load("ShortTrail") as GameObject; }
// Use this for initialization void Start() { SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); PCS = GetComponent <PlayerControlScript> (); ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); SpriteColor = GetComponent <SpriteRenderer> (); CurrentColor = ES.GetColor(PCS.GetPlayerNum()); SpriteColor.color = CurrentColor; Stats = GameObject.Find("TotalStatsHolder").GetComponent <EndGameStatsScript>(); }
//ObjectPoolScript SwingEffectPool; // Use this for initializationswing void Awake() { groundMask = 1 << 8; playerGroundMask = 1 << 9; // maybe nine maybe just a number IS = GetComponent <InputScript> (); SR = GetComponent <SpriteRenderer> (); SS = GameObject.Find("ScoreObject").GetComponent <ScoreScript>(); SS.AddPlayer(gameObject); SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); //SwingEffectPool = GameObject.Find ("LinePooler").GetComponent<ObjectPoolScript> (); }
// Use this for initialization void Start() { PCS = GetComponent <PlayerControlScript> (); SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); OP = GameObject.Find("ObjectPoolerIntercept").GetComponent <ObjectPoolScript> (); AS = GetComponent <AmmoScript>(); AS.SetSecondaryMagazineSize(2); PCS.SetSecondaryWeapon(Shoot); ShotTimer = 0; ShootFireCooldown = 50; CanShoot = true; projectile = Resources.Load("InterCeptorPrefab") as GameObject; }
// Use this for initialization void Start() { ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); PCS = GetComponent <PlayerControlScript> (); SPS = GameObject.Find("Main Camera").GetComponent <SoundPlayerScript> (); AS = GetComponent <AmmoScript>(); AS.SetSecondaryMagazineSize(2); PCS.SetSecondaryWeapon(Shoot); ShotTimer = 0; ShootFireCooldown = 50; CanShoot = true; projectile = Resources.Load("KnifeProjectilePrefab") as GameObject; }
// Use this for initialization void Start() { ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); OPProjectile = GameObject.Find("ObjectPoolerTripMine").GetComponent <ObjectPoolScript> (); PCS = GetComponent <PlayerControlScript> (); AS = GetComponent <AmmoScript>(); AS.SetSecondaryMagazineSize(2); PCS.SetSecondaryWeapon(Shoot); ShotTimer = 0; ShootFireCooldown = 25; CanShoot = true; }
// Use this for initialization void Start() { ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); OPProjectile = GameObject.Find("ObjectPoolerFireArrow").GetComponent <ObjectPoolScript> (); PCS = GetComponent <PlayerControlScript> (); AS = GetComponent <AmmoScript>(); AS.SetPrimaryMagazineSize(3); AS.SetReloadTime(1.5f); PCS.SetPrimaryWeapon(Shoot); ShotTimer = 0; ShootFireCooldown = 15; CanShoot = true; }
// Use this for initialization void Start() { ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); PCS = GetComponent <PlayerControlScript> (); AS = GetComponent <AmmoScript>(); AS.SetPrimaryMagazineSize(1); AS.SetReloadTime(.5f); PCS.SetPrimaryWeapon(Charge); ShotTimer = 0; ShootFireCooldown = 15; CanShoot = true; projectile = Resources.Load("SwordPrefab") as GameObject; }
// Use this for initialization void Start() { ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); SPS = GameObject.Find("Main Camera").GetComponent <SoundPlayerScript> (); PCS = GetComponent <PlayerControlScript> (); AS = GetComponent <AmmoScript>(); AS.SetPrimaryMagazineSize(3); AS.SetReloadTime(2f); PCS.SetPrimaryWeapon(Shoot); ShotTimer = 0; ShootFireCooldown = 15; CanShoot = true; projectile = Resources.Load("SplitProjectilePrefab") as GameObject; Trail = Resources.Load("ShortTrail") as GameObject; }
// Use this for initialization void Start() { ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); OPProjectile = GameObject.Find("ObjectPoolerAssault").GetComponent <ObjectPoolScript> (); OPTrail = GameObject.Find("ObjectPoolerTrailS").GetComponent <ObjectPoolScript> (); PCS = GetComponent <PlayerControlScript> (); AS = GetComponent <AmmoScript>(); AS.SetPrimaryMagazineSize(15); AS.SetReloadTime(2f); PCS.SetPrimaryWeapon(Shoot); ShotTimer = 0; ShootFireCooldown = 4; CanShoot = true; //projectile = Resources.Load ("AssultProjectilePrefab") as GameObject; //Trail = Resources.Load ("ShortTrail") as GameObject; }
// Use this for initialization void Start() { ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); PCS = GetComponent <PlayerControlScript> (); AS = GetComponent <AmmoScript>(); AS.SetSecondaryMagazineSize(2); PCS.SetSecondaryWeapon(ShootOutline); PCS.SetSecondaryWeaponRelease(Shoot); CanShoot = true; projectile = Resources.Load("ShieldPrefab") as GameObject; POutline = Instantiate(projectile, Vector3.zero, Quaternion.identity) as GameObject; Color CtoChange = ES.GetColor(PCS.GetPlayerNum()); CtoChange.a = .75f; POutline.GetComponent <SpriteRenderer> ().color = CtoChange; POutline.SetActive(false); }
// Use this for initialization void Start() { CCS = GameObject.Find("Main Camera").GetComponent <CameraControllerScript>(); PCS = GetComponent <PlayerControlScript> (); PlayerColor = GetComponent <SpriteRenderer> ().color; RHS = GameObject.Find("WinTextObj").GetComponent <RoundHandlerScript> (); BoarderColor = HitBoarder.color; SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); Stats = GameObject.Find("TotalStatsHolder").GetComponent <EndGameStatsScript>(); ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); Invincible = true; bulletNumbers = new int[4]; for (int x = 0; x < 4; x++) { bulletNumbers[x] = -1; } Invoke("RemoveIncincible", 2f); }
// Use this for initialization void Start() { ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); PCS = GetComponent <PlayerControlScript> (); SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); AS = GetComponent <AmmoScript>(); AS.SetSecondaryMagazineSize(2); PCS.SetSecondaryWeapon(Shoot); ShotTimer = 0; ShootFireCooldown = 10; CanShoot = true; ProjectileWrapper = Resources.Load("WallProjectileWrapper") as GameObject; ProjectileWrapper = Instantiate(ProjectileWrapper, Vector3.zero, Quaternion.identity) as GameObject; PrimaryBullet = ProjectileWrapper.transform.GetChild(0).gameObject; SecondaryBullet = ProjectileWrapper.transform.GetChild(1).gameObject; WPS = PrimaryBullet.GetComponent <WallProjectileScript> (); PrimaryBullet.SetActive(false); SecondaryBullet.SetActive(false); }
// Use this for initialization void Start() { ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); OPProjectile = GameObject.Find("ObjectPoolerRng").GetComponent <ObjectPoolScript> (); OPGrenade = GameObject.Find("ObjectPoolerGrenadeRng").GetComponent <ObjectPoolScript> (); OPTrail = GameObject.Find("ObjectPoolerTrailS").GetComponent <ObjectPoolScript> (); PCS = GetComponent <PlayerControlScript> (); AS = GetComponent <AmmoScript>(); AS.SetPrimaryMagazineSize(5); AS.SetReloadTime(2f); PCS.SetPrimaryWeapon(Shoot); ShotTimer = 0; ShootFireCooldown = 20; CanShoot = true; projectile = Resources.Load("RngGunProjectile") as GameObject; projectileG = Resources.Load("GrenadeRngPrefab") as GameObject; Trail = Resources.Load("ShortTrail") as GameObject; }
// Use this for initialization void Start() { ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); PCS = GetComponent <PlayerControlScript> (); SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); OPProjectile = GameObject.Find("ObjectPoolerGrenade").GetComponent <ObjectPoolScript> (); OPTrail = GameObject.Find("ObjectPoolerTrailS").GetComponent <ObjectPoolScript> (); AS = GetComponent <AmmoScript>(); AS.SetSecondaryMagazineSize(2); PCS.SetSecondaryWeapon(Cook); PCS.SetSecondaryWeaponRelease(Shoot); ShotTimer = 0; CookTime = 0; ShootFireCooldown = 50; CanShoot = true; projectile = Resources.Load("GrenadePrefab") as GameObject; Trail = Resources.Load("ShortTrail") as GameObject; GrenadeDetonateTime = projectile.GetComponent <ProjectileScript> ().SelfDestruct; }
// Use this for initialization void Start() { LeftRightPos = new int[4]; UpDownPos = new int[4]; InputResetCounter = new int[4]; InputAllowed = new bool[4]; LockedIn = new bool[4]; SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); SetBoarderActive(0); playerIndex = new PlayerIndex[4]; state = new GamePadState[4]; prevState = new GamePadState[4]; for (int x = 0; x < 4; x++) { playerIndex [x] = (PlayerIndex)x; } }
// Use this for initialization void Start() { ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); PCS = GetComponent <PlayerControlScript> (); SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); OPProjectile = GameObject.Find("ObjectPoolerLazer").GetComponent <ObjectPoolScript> (); particlesOBJ = Resources.Load("ChargeParticleHolder") as GameObject; AS = GetComponent <AmmoScript>(); AS.SetPrimaryMagazineSize(6); AS.SetReloadTime(3f); PCS.SetPrimaryWeapon(Charge); PCS.SetPrimaryWeaponRelease(Shoot); ShotTimer = 0; chargeLevel = 1; ShootFireCooldown = 7; CanShoot = true; particlesOBJ = Instantiate(particlesOBJ, transform.position, transform.rotation) as GameObject; particlesSystem = particlesOBJ.GetComponentInChildren <ParticleSystem> (); particlesSystem.startColor = ES.GetColor(PCS.GetPlayerNum()); particlesOBJ.SetActive(false); }
// Use this for initialization void Start() { SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); LeftRightPos = new int[4]; UpDownPos = new int[4]; InputAllowedLR = new bool[4]; InputAllowedUD = new bool[4]; InputResetCounterLR = new int[4]; InputResetCounterUD = new int[4]; CurrentSlide = new int[4] { 1, 1, 1, 1 }; CurrentSelectedButton = new int[4]; playerIndex = new PlayerIndex[4]; state = new GamePadState[4]; prevState = new GamePadState[4]; lockedIn = false; NumberOfPlayers = 0; for (int x = 0; x < 4; x++) { playerIndex [x] = (PlayerIndex)x; } if (ES.CheckIfSecondVisit()) { SetOverviewPrimaryText(0, ES.GetPrimary(0)); SetOverviewPrimaryText(1, ES.GetPrimary(1)); SetOverviewPrimaryText(2, ES.GetPrimary(2)); SetOverviewPrimaryText(3, ES.GetPrimary(3)); SetOverviewSecondaryText(0, ES.GetSecondary(0)); SetOverviewSecondaryText(1, ES.GetSecondary(1)); SetOverviewSecondaryText(2, ES.GetSecondary(2)); SetOverviewSecondaryText(3, ES.GetSecondary(3)); } }
// Use this for initialization void Start() { ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); LeftRightPos = new int[4]; UpDownPos = new int[4]; InputAllowed = new bool[4]; LockedIn = new bool[4]; ActivePlayer = new bool[4]; PlayerVote = new int[4]; InputResetCounter = new int[4]; SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); playerIndex = new PlayerIndex[4]; state = new GamePadState[4]; prevState = new GamePadState[4]; for (int x = 0; x < 4; x++) { playerIndex [x] = (PlayerIndex)x; } Invoke("DelayInitialPosition", .1f); }
// Use this for initialization void Start() { ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); LeftRightPos = new int[4]; UpDownPos = new int[4]; InputResetCounter = new int[4]; InputAllowed = new bool[4]; CurrentPlayer = new bool[4]; PCS = new PlayerControlScript[4]; SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); SetBoarderActive(0); playerIndex = new PlayerIndex[4]; state = new GamePadState[4]; prevState = new GamePadState[4]; for (int x = 0; x < 4; x++) { playerIndex [x] = (PlayerIndex)x; } }
// Use this for initialization void Start() { CFS = GameObject.Find("Main Camera").GetComponent <CameraFollowScript> (); SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); Invoke("StartGame", 2f); }
// Use this for initialization void Start() { SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); }
public static bool PreFix() { if (!(PlayerChatManager.Current.m_currentValue.Length > 2)) { return(true); } if (!PlayerChatManager.Current.m_currentValue.StartsWith("/")) { return(true); } PlayerChatManager.Current.m_currentValue = PlayerChatManager.Current.m_currentValue.Remove(0, 1); string[] args = PlayerChatManager.Current.m_currentValue.Split(" "); PUI_GameEventLog chat = UnityEngine.Object.FindObjectOfType <PUI_GameEventLog>(); if (chat == null) { Log.Error($"TextChatHook invoked, but PUI_GameEventLog cannot be found"); return(true); } SoundPlayerScript soundPlayer = UnityEngine.Object.FindObjectOfType <SoundPlayerScript>(); if (soundPlayer == null) { Log.Error($"TextChatHook invoked, but SoundPlayerScript cannot be found"); return(true); } switch (args[0].ToLower()) { case "clear": case "cls": for (int i = 0; i < chat.m_logItemsMax; i++) { chat.AddLogItem("", eGameEventChatLogType.IncomingChat); } PlayerChatManager.Current.m_currentValue = ""; PlayerChatManager.Current.ExitChatMode(); return(false); case "changesound": case "editsound": case "sound": case "s": if (!uint.TryParse(args[1], out uint eventId)) { PropertyInfo[] properties = typeof(EVENTS).GetProperties(); PropertyInfo[] matches = properties.Where((x) => x.Name.ToLower().Contains(args[1].ToLower())).ToArray(); if (matches.Length == 0) { chat.AddLogItem($"<color=#1ac725>Couldn't find a sound with name {args[1]}</color>", eGameEventChatLogType.IncomingChat); PlayerChatManager.Current.m_currentValue = ""; PlayerChatManager.Current.ExitChatMode(); return(false); } if (matches.Length > 1) { string log = $"<color=#1ac725>Found more than one sounds that match {args[1]}:\n"; for (int i = 0; i < matches.Length; i++) { log += $"\t{matches[i].Name}: {matches[i].GetValue(null)}"; if (i < matches.Length - 1) { log += "\n"; } } log += $"</color>"; chat.AddLogItem(log, eGameEventChatLogType.IncomingChat); PlayerChatManager.Current.m_currentValue = ""; PlayerChatManager.Current.ExitChatMode(); return(false); } eventId = (uint)matches[0].GetValue(null); } chat.AddLogItem($"<color=#1ac725>Changing sound to {eventId}</color>", eGameEventChatLogType.IncomingChat); soundPlayer.SoundId = eventId; PlayerChatManager.Current.m_currentValue = ""; PlayerChatManager.Current.ExitChatMode(); return(false); } return(true); }