From eaa0b14fb260f4f4a46ae5143b491171dc450355 Mon Sep 17 00:00:00 2001 From: edy Date: Mon, 13 Jul 2026 10:56:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9h5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Plugins/H5View.m | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Assets/Scripts/Plugins/H5View.m b/Assets/Scripts/Plugins/H5View.m index b9d006a..f8664c7 100644 --- a/Assets/Scripts/Plugins/H5View.m +++ b/Assets/Scripts/Plugins/H5View.m @@ -10,6 +10,9 @@ #import "CustomView.h" #import "UnityFramework.h" #import +// 显式声明 Unity 的消息发送函数,防止编译器报错 +#import +#import "UnityInterface.h" @implementation H5View{ @@ -329,24 +332,24 @@ //-(void)upDataH5times:(char*)weblink times:(int)times is_dark:(BOOL)is_dark{ -// +// // NSString *myNSString = [[NSString alloc] initWithUTF8String:weblink]; // if(is_dark){ // for (int counter = 0; counter < dark_url_array.count; counter++) { -// +// // if( [dark_url_array[counter][0] isEqualToString:myNSString]){ // dark_url_array[counter][2]=@(times); -// +// // dark_though_rate[[dark_url_array[counter][4] intValue]-1]=@([dark_url_array[counter][3] intValue]); -// -// +// +// // break; // } // } // } // else{ // for (int counter = 0; counter < light_url_array.count; counter++) { -// +// // if( [light_url_array[counter][0] isEqualToString:myNSString]){ // light_url_array[counter][2]=@(times); // //light_though_rate=[light_url_array[counter][3] intValue]; @@ -570,17 +573,17 @@ // float maxvalue=0; // float random3 ; // float rate=0; -// -// -// +// +// +// // for (int counter = 0; counter < dark_url_array.count; counter++) { // if([dark_url_array[counter][2] intValue]>0 ){ // if([dark_url_array[counter][4] intValue]!=(type+1) ) continue; // maxvalue+=[dark_url_array[counter][1] floatValue]; // } -// +// // } -// +// // if(maxvalue>0){ // random3=arc4random_uniform(maxvalue); // for (int counter = 0; counter < dark_url_array.count; counter++) { @@ -753,7 +756,7 @@ // NSString *objcString = [NSString stringWithUTF8String:darkWVDailyrefreshtimes_str]; // NSArray *stringArray = [objcString componentsSeparatedByString:@"|"]; // NSMutableArray *intArray = [NSMutableArray array]; -// +// // for (NSString *str in stringArray) { // [intArray addObject:@([str intValue])]; // }