https://clipchamp.com/watch/Zc33Ke27TrP




데이터는 52MB라서, 용량이 53MB인데 문제는 50MB 이내만 올릴 수 있어서...




void TriggerCheck(Collider other, List<Transform> list, ItemMode itemMode) {

int index = -1;

string modelname="";

for(int i = 0; i < list.Count ; i++) {

if(other.gameObject == list[i].gameObject){

index = i;

modelname = list[index].gameObject.name;

break;

}

}

if (modelname.Length == 0) {

Debug.LogWarning("modelname not found");

return;

}

stage2map.RemoveModel(index, list);//


if (itemMode == ItemMode.SmallStarMode)

Score += 20;

if (itemMode == ItemMode.BigStarMode)

Score += 50;

if (itemMode == ItemMode.SmallCoinMode)

Coin += 30;

if (itemMode == ItemMode.BigCoinMode)

Coin += 70;


}

void TriggerCheckAlphabet(Collider other, List<Transform> list, ItemMode itemMode) {

int index = -1;

string modelname="";

for(int i = 0; i < list.Count ; i++) {

if(other.gameObject == list[i].gameObject){

index = i;

modelname = list[index].gameObject.name;

break;

}

}

if (modelname.Length == 0) {

Debug.LogWarning("modelname not found");

return; //아그리고 이게 기억나네 return 하고 return 0 하고 void에서 는 차이가 있음. 그래서 헤맸던 기억이남 return은 void 타입에서 필수

// 가령 void 타입이 아니고, int 이면 return 0이 되야 하는데, 타입이 void 잖아... 이런거는 malloc alloc realloc 할때 동적할당 할때 타입에 대해서나올텐데, 내가 C를 잘 몰라

}

stage2map.RemoveModel(index, list);//포르투갈어로 posicao 이거 보여줄께

if(itemMode == ItemMode.W_ColorMode)

ColorItemUp(1, W_Color);

else if(itemMode == ItemMode.E_ColorMode)

ColorItemUp(1, E_Color);

else if(itemMode == ItemMode.A_ColorMode)

ColorItemUp(1, A_Color);

else if(itemMode == ItemMode.P_ColorMode)

ColorItemUp(1, P_Color);

else if(itemMode == ItemMode.O_ColorMode)

ColorItemUp(1, O_Color);

else if(itemMode == ItemMode.N_ColorMode)

ColorItemUp(1, N_Color);

else if(itemMode == ItemMode.F_ColorMode)

ColorItemUp(1, F_Color);

else if(itemMode == ItemMode.L_ColorMode)

ColorItemUp(1, L_Color);

else if(itemMode == ItemMode.Y_ColorMode)

ColorItemUp(1, Y_Color);

}

//OnTriggerEnter

void OnTriggerEnter(Collider other) {

if (other.gameObject.tag == "W")

TriggerCheckAlphabet(other, stage2map.AlphabetList, ItemMode.W_ColorMode);

if (other.gameObject.tag == "E")

TriggerCheckAlphabet(other, stage2map.AlphabetList, ItemMode.E_ColorMode);

if (other.gameObject.tag == "A")

TriggerCheckAlphabet(other, stage2map.AlphabetList, ItemMode.A_ColorMode);

if (other.gameObject.tag == "P")

TriggerCheckAlphabet(other, stage2map.AlphabetList, ItemMode.P_ColorMode);

if (other.gameObject.tag == "O")

TriggerCheckAlphabet(other, stage2map.AlphabetList, ItemMode.O_ColorMode);

if (other.gameObject.tag == "N")

TriggerCheckAlphabet(other, stage2map.AlphabetList, ItemMode.N_ColorMode);

if (other.gameObject.tag == "F")

TriggerCheckAlphabet(other, stage2map.AlphabetList, ItemMode.F_ColorMode);

if (other.gameObject.tag == "L")

TriggerCheckAlphabet(other, stage2map.AlphabetList, ItemMode.L_ColorMode);

if (other.gameObject.tag == "Y")

TriggerCheckAlphabet(other, stage2map.AlphabetList, ItemMode.Y_ColorMode);


if (other.gameObject.tag == "Change")

StartCoroutine("TurboMode", other);


if (other.gameObject.tag == "SmallStar")

TriggerCheck(other, stage2map.SmallStarList, ItemMode.SmallStarMode);

if (other.gameObject.tag == "BigStar")

TriggerCheck(other, stage2map.BigStarList, ItemMode.BigStarMode);

if (other.gameObject.tag == "SmallCoin")

TriggerCheck(other, stage2map.SmallCoinList, ItemMode.SmallCoinMode);

if (other.gameObject.tag == "BigCoin")

TriggerCheck(other, stage2map.BigCoinList, ItemMode.BigCoinMode);

}


/// TriggerCheck