void Start() { wagon = GameObject.FindGameObjectWithTag("Wagon").GetComponent <WagonAbility>(); JumpAttack = GameObject.Find("JumpAttack").GetComponent <AudioSource>(); PunchHit = GameObject.Find("PunchHit").GetComponent <AudioSource>(); StoneDie = GameObject.Find("RockDie").GetComponent <AudioSource>(); sprite = GetComponent <SpriteRenderer>(); rigid = gameObject.GetComponent <Rigidbody2D>(); coll = transform.gameObject.GetComponent <BoxCollider2D>(); GM = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>(); player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); curCh = PlayerPrefs.GetInt("curCh"); curWg = PlayerPrefs.GetInt("curWg"); curWp = PlayerPrefs.GetInt("curWp"); if (GM.GameLevel == 1) { HP[m_num] += 5; } if (GM.GameLevel == 2) { HP[m_num] += 10; } if (GM.GameLevel == 3) { HP[m_num] += 15; } }
void Start() { Explosion = GameObject.Find("Explosion").GetComponent <AudioSource>(); Penguin1 = GameObject.Find("Penguin1").GetComponent <AudioSource>(); rigid = gameObject.GetComponent <Rigidbody2D>(); //coll = transform.GetChild(0).gameObject.GetComponent<BoxCollider2D>(); GM = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>(); player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); HPbar = GameObject.FindGameObjectWithTag("BossHP"); wagon = GameObject.FindGameObjectWithTag("Wagon").GetComponent <WagonAbility>(); Chat = transform.GetChild(2).gameObject; curWg = PlayerPrefs.GetInt("curWg"); if (GM.GameLevel == 1) { HP += 40; MaxHP += 40; } if (GM.GameLevel == 2) { HP += 80; MaxHP += 80; } if (GM.GameLevel == 2) { HP += 140; MaxHP += 140; } StartCoroutine("Appear"); // 등.장 }
void Start() { JumpAttack = GameObject.Find("JumpAttack").GetComponent <AudioSource>(); PunchHit = GameObject.Find("PunchHit").GetComponent <AudioSource>(); Penguin1 = GameObject.Find("Penguin1").GetComponent <AudioSource>(); Penguin2 = GameObject.Find("Penguin2").GetComponent <AudioSource>(); CannonShot = GameObject.Find("CannonShot").GetComponent <AudioSource>(); sprite = GetComponent <SpriteRenderer>(); rigid = gameObject.GetComponent <Rigidbody2D>(); coll = transform.GetChild(0).gameObject.GetComponent <BoxCollider2D>(); GM = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>(); player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); wagon = GameObject.FindGameObjectWithTag("Wagon").GetComponent <WagonAbility>(); HPbar = transform.GetChild(2).gameObject; Chat = transform.GetChild(1).gameObject; curCh = PlayerPrefs.GetInt("curCh"); curWg = PlayerPrefs.GetInt("curWg"); curWp = PlayerPrefs.GetInt("curWp"); if (GM.GameLevel == 1) { HP[m_num] += 2; HPMax[m_num] += 2; } if (GM.GameLevel == 2) { HP[m_num] += 4; HPMax[m_num] += 4; } if (GM.GameLevel == 3) { HP[m_num] += 8; HPMax[m_num] += 8; } if (m_num != 2) { Speed[m_num] = Random.Range(1f, 1.4f); } if (PlayerPrefs.GetInt("toutorial") == 1) { Speed[m_num] = 1.4f; } if ((m_num == 0 || m_num == 2) && PlayerPrefs.GetInt("toutorial") == 0) { StartCoroutine("Jump"); } if (m_num == 1) { ChatPopUp("안녕", 1.3f, 3); } if (m_num == 2) { ChatPopUp("ㅡㅅㅡ", 1.5f, 2); } if (m_num == 5) { ChatPopUp("꼬북꼬북", 1.5f, 2); } }