private void Awake() { if (m_TextLife == null) { throw new ObjectNullException(typeof(UIManager), nameof(m_TextLife)); } if (m_TextScore == null) { throw new ObjectNullException(typeof(UIManager), nameof(m_TextScore)); } if (m_TextHelp == null) { throw new ObjectNullException(typeof(UIManager), nameof(m_TextHelp)); } if (m_TextPlayerUltimate == null) { throw new ObjectNullException(typeof(UIManager), nameof(m_TextPlayerUltimate)); } m_PlayerManager = ManagerPool.GetInstance().GetManager <PlayerManager>(); UpdateScore(); UpdateLife(); UpdatePlayerUltimate(); }
private void VaribleInitialize() { /*---------------------------------------------------------------------------------------*/ //Spawn Holder foreach (var form in m_EdgeSpawnPointsHolder) { m_EdgeSpawnPoints.Add(form as Transform); } foreach (var form in m_LeftSpawnPointsHolder) { m_LeftSpawnPoints.Add(form as Transform); } foreach (var form in m_RightSpawnPointsHolder) { m_RightSpawnPoints.Add(form as Transform); } foreach (var form in m_BottomSpawnPointsHolder) { m_BottomSpawnPoints.Add(form as Transform); } foreach (var form in m_TopSpawnPointsHolder) { m_TopSpawnPoints.Add(form as Transform); } /*---------------------------------------------------------------------------------------*/ //Target Holder foreach (var form in m_EdgeTargetPointsHolder) { m_EdgeTargetPoints.Add(form as Transform); } foreach (var form in m_LeftTargetPointsHolder) { m_LeftTargetPoints.Add(form as Transform); } foreach (var form in m_RightTargetPointsHolder) { m_RightTargetPoints.Add(form as Transform); } foreach (var form in m_BottomTargetPointsHolder) { m_BottomTargetPoints.Add(form as Transform); } foreach (var form in m_TopTargetPointsHolder) { m_TopTargetPoints.Add(form as Transform); } m_StageManager = ManagerPool.GetInstance().GetManager <StageManager>(); }
protected virtual void Awake() { this.m_IsPlaying = false; this.m_IsLoop = false; this.m_RoutineList = new List <IEnumerator>(); this.m_PlayerManager = ManagerPool.GetInstance().GetManager <PlayerManager>(); this.m_ParticleManager = ManagerPool.GetInstance().GetManager <ParticleManager>(); }
void Awake() { VariableInit(); EquipDefaultWeapon(); m_UIManager = ManagerPool.GetInstance().GetManager <UIManager>(); m_PlayerSupporterManager = ManagerPool.GetInstance().GetManager <PlayerSupporterManager>(); }
void Awake() { Manager.IsGameStarted = true; Screen.SetResolution(480, 800, false); ManagerPool.GetInstance(); RoundEventInvoker.Init(); DOTween.Init(null, true); }
private void Start() { m_ObjectManager = ManagerPool.GetInstance().GetManager <ObjectManager>(); ObjectInjectionCheck(); VariableInit(); RoundInit(); GameStart(); StartCoroutine(RoundChecker()); }
public AttackAction(MonoBehaviour monoBehaviour, Transform fireTransform, Vector3 defaultDirection, int bulletDamage, float bulletSpeed, EntityBulletType EntityBulletType, AllyFlag allyFlag) { this.m_MonoBehaviour = monoBehaviour; this.m_Waitor = new EventWaitor(monoBehaviour); this.m_FireTransform = fireTransform; this.m_BulletManager = ManagerPool.GetInstance().GetManager <BulletManager>(); this.m_BulletDamage = bulletDamage; this.m_BulletSpeed = bulletSpeed; this.m_EntityBulletType = EntityBulletType; this.m_DefaultDirection = defaultDirection; this.m_AllyFlag = allyFlag; }
private void VariableInit() { m_PlayerManager = ManagerPool.GetInstance().GetManager <PlayerManager>(); //쿨탐 초기화 m_PlayerGun = m_PlayerManager.GetPlayerGun(); m_PlayerGun.SetCurrentBulletFiringTime(0.0f); GunCoreCharging charging = m_PlayerGun.GetCore <GunCoreCharging>(); if (charging != null) { charging.SetIsChargingFull(false); charging.SetIsChargingFiring(false); charging.SetIsCharging(false); charging.SetChargingTime(0.0f); } }
protected override void Awake() { base.Awake(); m_PlayerSupporterType = PlayerSupporterType.Default; m_PlayerManager = ManagerPool.GetInstance().GetManager <PlayerManager>(); m_Tween = gameObject.transform.DOMove(new Vector3(), 0.2f).SetAutoKill(false); m_Tween.Pause(); m_LastPosition = new Vector3(); if (m_FireTransforms.Length == 0) { throw new ObjectNullException(typeof(PlayerSupporterCore), nameof(m_FireTransforms)); } EventCore() .Wait(1.0f) .AppendAttackCornShot(m_FireTransforms[0], 10, 200.0f, EntityBulletType.SmallBean, 0.0f, 1, AllyFlag.Player, Vector3.up) .Loop(true) .Run(); }
public Round() { this.m_StageManager = ManagerPool.GetInstance().GetManager <StageManager>(); this.m_PlayerManager = ManagerPool.GetInstance().GetManager <PlayerManager>(); this.m_EnemyManager = ManagerPool.GetInstance().GetManager <EnemyManager>(); this.m_UIManager = ManagerPool.GetInstance().GetManager <UIManager>(); this.m_EdgeSpawnPoints = m_EnemyManager.GetEnemySpawnPoints(Direction.Default); this.m_LeftSpawnPoints = m_EnemyManager.GetEnemySpawnPoints(Direction.Left); this.m_RightSpawnPoints = m_EnemyManager.GetEnemySpawnPoints(Direction.Right); this.m_TopSpawnPoints = m_EnemyManager.GetEnemySpawnPoints(Direction.Top); this.m_BottomSpawnPoints = m_EnemyManager.GetEnemySpawnPoints(Direction.Bottom); this.m_EdgeTargetPoints = m_EnemyManager.GetTargetPoints(Direction.Default); this.m_LeftTargetPoints = m_EnemyManager.GetTargetPoints(Direction.Left); this.m_RightTargetPoints = m_EnemyManager.GetTargetPoints(Direction.Right); this.m_TopTargetPoints = m_EnemyManager.GetTargetPoints(Direction.Top); this.m_BottomTargetPoints = m_EnemyManager.GetTargetPoints(Direction.Bottom); this.m_ScreenSize = m_StageManager.GetScreenSize(); this.m_PathHolderList = m_StageManager.GetPathHolders(); }
void Start() { m_Transform = GetComponent <Transform>(); m_Walls = ManagerPool.GetInstance().GetManager <ObjectManager>().GetWalls(); m_PlayerManager = ManagerPool.GetInstance().GetManager <PlayerManager>(); }
private void Start() { m_StageManager = ManagerPool.GetInstance().GetManager <StageManager>(); }
private void VariableInit() { m_PlayerManager = ManagerPool.GetInstance().GetManager <PlayerManager>(); m_StageManager = ManagerPool.GetInstance().GetManager <StageManager>(); m_EnemyManager = ManagerPool.GetInstance().GetManager <EnemyManager>(); }
protected void OnTriggerEnter(Collider coll) { if (coll.tag == "EnemyBullet") { if (gameObject.layer == LayerMask.NameToLayer("EnemyEntity")) { return; } ParticleFactory.GetInstance().CreateOnceParticle <ParticleExplosion>(coll.gameObject.GetComponent <Collider>().ClosestPointOnBounds(transform.position)) .SetExplosionParticleNumber(10) .SetMinExplosionDistance(1.0f) .SetMaxExplosionDistance(3.0f) .SetExplosionParticleLifeTime(0.4f) .SetExplosionParticleColor(new Color(Random.Range(0.5f, 1.0f), Random.Range(0.5f, 1.0f), Random.Range(0.5f, 1.0f))) .Play(); if (m_Core.isPenetrable() == false) { Destroy(coll.gameObject.transform.parent.gameObject); } Material material = GetComponentInChildren <MeshRenderer>().material; if (m_Core.IsInvincible() == false) { m_Core.SetHp <EntityCore>(m_Core.GetHp() - ManagerPool.GetInstance().GetManager <PlayerManager>().GetPlayerGun().GetBulletDamage()); } if (m_Core.GetHp() <= 0) { PlayerManager playerManager = ManagerPool.GetInstance().GetManager <PlayerManager>(); playerManager.SetPlayerScore(playerManager.GetPlayerScore() + m_Core.GetScore()); ParticleFactory.GetInstance().CreateOnceParticle <ParticleExplosion>(gameObject.transform.position) .SetExplosionParticleColor(new Color(Random.Range(0.5f, 1.0f), Random.Range(0.5f, 1.0f), Random.Range(0.5f, 1.0f))) .Play(); Destroy(gameObject); material.DOKill(); } else { DOTween.Sequence() .Append(material.DOColor(Color.white, 0.05f)) .Append(material.DOColor(m_Core.GetColor(), 0.05f)); } } if (coll.tag == "PlayerBullet") { if (gameObject.layer == LayerMask.NameToLayer("PlayerEntity")) { return; } ParticleFactory.GetInstance().CreateOnceParticle <ParticleExplosion>(coll.gameObject.GetComponent <Collider>().ClosestPointOnBounds(transform.position)) .SetExplosionParticleNumber(10) .SetMinExplosionDistance(1.0f) .SetMaxExplosionDistance(3.0f) .SetExplosionParticleLifeTime(0.4f) .SetExplosionParticleColor(new Color(Random.Range(0.5f, 1.0f), Random.Range(0.5f, 1.0f), Random.Range(0.5f, 1.0f))) .Play(); if (m_Core.isPenetrable() == false) { Destroy(coll.gameObject.transform.parent.gameObject); } Material material = GetComponentInChildren <MeshRenderer>().material; if (m_Core.IsInvincible() == false) { m_Core.SetHp <EntityCore>(m_Core.GetHp() - ManagerPool.GetInstance().GetManager <PlayerManager>().GetPlayerGun().GetBulletDamage()); } if (m_Core.GetHp() <= 0) { PlayerManager playerManager = ManagerPool.GetInstance().GetManager <PlayerManager>(); ItemManager itemManager = ManagerPool.GetInstance().GetManager <ItemManager>(); playerManager.SetPlayerScore(playerManager.GetPlayerScore() + m_Core.GetScore()); ParticleFactory.GetInstance().CreateOnceParticle <ParticleExplosion>(gameObject.transform.position) .SetExplosionParticleColor(new Color(Random.Range(0.5f, 1.0f), Random.Range(0.5f, 1.0f), Random.Range(0.5f, 1.0f))) .Play(); float randNum = Random.Range(0.0f, 1000.0f); if (randNum <= 1000.0f) { ItemType itemType = (ItemType)Random.Range(1, Enum.GetValues(typeof(ItemType)).Cast <int>().Max() + 1); itemManager.SpawnItem(itemType, gameObject.transform.position); } Destroy(gameObject); material.DOKill(); } else { if (m_Core.IsInvincible() == false) { DOTween.Sequence() .Append(material.DOColor(Color.white, 0.05f)) .Append(material.DOColor(m_Core.GetColor(), 0.05f)); } } } }
private void Start() { m_PlayerManager = ManagerPool.GetInstance().GetManager <PlayerManager>(); m_PlayerGun = m_PlayerManager.GetPlayerGun(); m_PlayerGun.SetUltimateEnabled(true); }
private void Start() { m_PlayerManager = ManagerPool.GetInstance().GetManager <PlayerManager>(); }
private void VariableInit() { m_PlayerManager = ManagerPool.GetInstance().GetManager <PlayerManager>(); }
public static void Init() { m_StageManager = ManagerPool.GetInstance().GetManager <StageManager>(); }
/// <summary> /// 게임내 싱글톤리소스 초기화 /// </summary> void OnDestroy() { //ManagerPool은 static 싱글톤 객체이므로 라운드를 모두 클리어하게되어 메인메뉴로 이동할 경우 매니저풀을 모두 비워준다. ManagerPool.GetInstance().SafeClear(); }
void Start() { m_PlayerManager = ManagerPool.GetInstance().GetManager <PlayerManager>(); m_BulletSpeed = m_PlayerManager.GetPlayerGun().GetBulletSpeed(); }