//check if zombie has broken into door bool IsBreakingDoor(FightingInfo info) { for (int i = 0; i < info.InvadeResultInfosCount; i++) { if (info.GetInvadeResultInfos(i).Id == -1) { return(true); } } return(false); }
IEnumerator PlayInvadeAnimation(FightingInfo result) { //init player view for (int i = 0; i < result.UserInfosCount; i++) { UserInfo userInfo = result.GetUserInfos(i); PlayerIndexMap.Add(userInfo.Uid, i); SetPlayerView(ref playerViewList[i], userInfo); } for (int i = result.UserInfosCount; i < 4; i++) { DisablePlayerView(ref playerViewList[i]); } //play animation string resStr = null; resStr = "战斗开始"; AddText(ref resStr, false); for (int i = 3; i > 0; i--) { resStr = ""; int count = i; while (count-- > 0) { resStr += "."; } AddText(ref resStr, false); yield return(new WaitForSeconds(1.0f)); } resStr = ""; AddText(ref resStr); for (int i = 0; i < result.InvadeResultInfosCount; i++) { InvadeResultInfo info = result.GetInvadeResultInfos(i); ProcessSingleInfo(info, out resStr); AddText(ref resStr); yield return(new WaitForSeconds(1.0f)); } ShowResult(result.LossInfo, out resStr); AddText(ref resStr); }