public void RemoveSfx(SfxController sfx) { sfx.gameObject.SetActive(false); //해당 풀로 반환 var pool = m_sfxPool[sfx.m_type]; pool.Set(sfx); }
private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(gameObject); } }
private void Awake() { if (singleton == null) { singleton = this; } else { DestroyImmediate(gameObject); } }
public void Awake() { DontDestroyOnLoad(this.gameObject); if (SfxController.instance == null) { instance = this; } else if (this != instance) { Destroy(this.gameObject); } }
// Start is called before the first frame update void Start() { playerController = GameObject.Find("Player").GetComponent <PlayerController>(); playerData = GameObject.Find("PlayerData").GetComponent <PlayerData>(); playerLives = playerData.Lives; currentGameLevel = playerData.CurrentGameLevel; playerData.TotalGameLevel = TotalGameLevel; bgmController = GameObject.Find("BGM").GetComponent <BgmController>(); sfxController = GameObject.Find("SFX").GetComponent <SfxController>(); livesText.text = "" + playerLives; scoreText.text = "" + playerData.Score; IsGameOver = false; IsGamePaused = false; IsLevelComplete = false; }
// Start is called before the first frame update void Start() { UseUserInput = true; KeepLowBounce = false; gameManager = GameObject.Find("GameManager").GetComponent <GameManager>(); stage = GameObject.Find("Stage"); if (horse != null) { horseCs = horse.GetComponent <Horse>(); } sfxController = GameObject.Find("SFX").GetComponent <SfxController>(); mainCamera = GameObject.Find("Main Camera").GetComponent <Camera>(); rbPlayer = GetComponent <Rigidbody>(); playerAnim = GetComponent <Animator>(); playerCollider = GetComponent <CapsuleCollider>(); colliderHeight = playerCollider.height; startPos = transform.position; }
// Start is called before the first frame update void Start() { playerController = GameObject.Find("Player").GetComponent <PlayerController>(); sfxController = GameObject.Find("SFX").GetComponent <SfxController>(); }
void Start() { m_sfxController = GetComponent <SfxController>(); m_particles = GetComponentsInChildren <ParticleSystem>(); }