private void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player") { scoreManeger.AddScore(); Instantiate(particle, transform.position, Quaternion.identity); Destroy(marshmallow); } if (other.tag == "Flame") { scoreManeger.AddScore(); Instantiate(particle, transform.position, Quaternion.identity); Destroy(marshmallow); } }
void StageClear() { clear = true; StopCoroutine("ESpawn"); for (int i = 0; i < 4; i++) { if (!wallBroken[i]) { SM.Score += 100; } } SM.AddScore(); SM.Save(); Debug.Log("clear"); }
public void CheckHeight() { scoreManeger.AddScore(); for (int i = 0; i < stuckObj.Count; i++) { if (nowHeight <= stuckObj[i].transform.position.y) { nowHeight = stuckObj[i].transform.position.y; } } if (nowHeight <= putObj.transform.position.y) { nowHeight = putObj.transform.position.y; } StartCoroutine(UpCameraPos(nowHeight)); putObj = null; ChangeState(TowerBattleState.wait); }