Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
M
MusicBigWatermelon
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
MusicBigWatermelon
Commits
abf592aa
Commit
abf592aa
authored
Aug 04, 2021
by
LiLiuZhou
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.huolea.com:wangxuewei/musicbigwatermelon
parents
58d7062f
35e79f27
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
0 additions
and
378 deletions
+0
-378
webview.meta
Assets/Base/UnityTool/Plugins/Android/webview.meta
+0
-8
UnityCustomWebView.java
...UnityTool/Plugins/Android/webview/UnityCustomWebView.java
+0
-38
UnityCustomWebView.java.meta
...Tool/Plugins/Android/webview/UnityCustomWebView.java.meta
+0
-32
UnityWebActivity.java
...e/UnityTool/Plugins/Android/webview/UnityWebActivity.java
+0
-152
UnityWebActivity.java.meta
...tyTool/Plugins/Android/webview/UnityWebActivity.java.meta
+0
-32
unity_activity_web.xml
Assets/Plugins/Android/res/layout/unity_activity_web.xml
+0
-37
unity_activity_web.xml.meta
...ts/Plugins/Android/res/layout/unity_activity_web.xml.meta
+0
-7
mipmap-xhdpi.meta
Assets/Plugins/Android/res/mipmap-xhdpi.meta
+0
-8
arrow_left.png
Assets/Plugins/Android/res/mipmap-xhdpi/arrow_left.png
+0
-0
arrow_left.png.meta
Assets/Plugins/Android/res/mipmap-xhdpi/arrow_left.png.meta
+0
-7
wn_file_paths.xml
Assets/Plugins/Android/res/xml/wn_file_paths.xml
+0
-9
wn_file_paths.xml.meta
Assets/Plugins/Android/res/xml/wn_file_paths.xml.meta
+0
-7
GameController.cs
Assets/Scripts/Controllers/GameController.cs
+0
-33
HomeInfoControl.cs
Assets/Scripts/Main/HomeInfoControl.cs
+0
-8
No files found.
Assets/Base/UnityTool/Plugins/Android/webview.meta
deleted
100644 → 0
View file @
58d7062f
fileFormatVersion: 2
guid: e726c6009fdaa8040b670dae4de8ad0b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Base/UnityTool/Plugins/Android/webview/UnityCustomWebView.java
deleted
100644 → 0
View file @
58d7062f
package
com
.
ym
.
unityandroid
.
webview
;
import
android.annotation.TargetApi
;
import
android.content.Context
;
import
android.content.res.Configuration
;
import
android.os.Build
;
import
android.util.AttributeSet
;
import
android.webkit.WebView
;
public
class
UnityCustomWebView
extends
WebView
{
public
UnityCustomWebView
(
Context
context
)
{
super
(
getFixedContext
(
context
));
}
public
UnityCustomWebView
(
Context
context
,
AttributeSet
attrs
)
{
super
(
getFixedContext
(
context
),
attrs
);
}
@TargetApi
(
Build
.
VERSION_CODES
.
LOLLIPOP
)
public
UnityCustomWebView
(
Context
context
,
AttributeSet
attrs
,
int
defStyleAttr
)
{
super
(
getFixedContext
(
context
),
attrs
,
defStyleAttr
);
}
public
UnityCustomWebView
(
Context
context
,
AttributeSet
attrs
,
int
defStyleAttr
,
boolean
privateBrowsing
)
{
super
(
getFixedContext
(
context
),
attrs
,
defStyleAttr
,
privateBrowsing
);
}
public
static
Context
getFixedContext
(
Context
context
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
{
setWebContentsDebuggingEnabled
(
true
);
}
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
M
)
{
return
context
.
createConfigurationContext
(
new
Configuration
());
}
else
{
return
context
;
}
}
}
Assets/Base/UnityTool/Plugins/Android/webview/UnityCustomWebView.java.meta
deleted
100644 → 0
View file @
58d7062f
fileFormatVersion: 2
guid: dca9c2dd0eedf764d9aabbf83647e07f
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings: {}
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
Assets/Base/UnityTool/Plugins/Android/webview/UnityWebActivity.java
deleted
100644 → 0
View file @
58d7062f
package
com
.
ym
.
unityandroid
.
webview
;
import
android.app.Activity
;
import
android.content.Intent
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.os.Message
;
import
android.view.View
;
import
android.webkit.DownloadListener
;
import
android.webkit.WebChromeClient
;
import
android.webkit.WebSettings
;
import
android.webkit.WebView
;
import
android.webkit.WebViewClient
;
import
com.unity3d.player.R
;
public
class
UnityWebActivity
extends
Activity
{
private
String
url
;
private
UnityCustomWebView
webView
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
//getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView
(
R
.
layout
.
unity_activity_web
);
url
=
getIntent
().
getStringExtra
(
"url"
);
//title = getIntent().getStringExtra("title");
webView
=
findViewById
(
R
.
id
.
activity_webview
);
initTitle
();
initWebView
();
webView
.
loadUrl
(
url
);
}
private
void
initWebView
()
{
WebSettings
webSettings
=
webView
.
getSettings
();
webSettings
.
setSupportZoom
(
true
);
//支持缩放,默认为true。是下面那个的前提。
webSettings
.
setBuiltInZoomControls
(
true
);
//设置内置的缩放控件。若为false,则该WebView不可缩放
webSettings
.
setDisplayZoomControls
(
false
);
//隐藏原生的缩放控件
webSettings
.
setAllowFileAccess
(
true
);
//设置可以访问文件
webSettings
.
setJavaScriptCanOpenWindowsAutomatically
(
true
);
//支持通过JS打开新窗口
webSettings
.
setLoadsImagesAutomatically
(
true
);
//支持自动加载图片
webSettings
.
setDefaultTextEncodingName
(
"utf-8"
);
//设置编码格式
webView
.
getSettings
().
setUseWideViewPort
(
true
);
webView
.
getSettings
().
setLoadWithOverviewMode
(
true
);
// webView.getSettings().setDefaultFontSize(56);
// webView.getSettings().setMinimumFontSize(40);//设置最小字体
// 建议禁止缓存加载,以确保在攻击发生时可快速获取最新的滑动验证组件进行对抗。
webView
.
getSettings
().
setCacheMode
(
WebSettings
.
LOAD_NO_CACHE
);
// 设置不使用默认浏览器,而直接使用WebView组件加载页面。
// 设置WebView组件支持加载JavaScript。
webView
.
getSettings
().
setJavaScriptEnabled
(
true
);
// 建立JavaScript调用Java接口的桥梁。
webView
.
getSettings
().
setJavaScriptCanOpenWindowsAutomatically
(
true
);
try
{
// API 7, LocalStorage/SessionStorage
webSettings
.
setDomStorageEnabled
(
true
);
webSettings
.
setDatabaseEnabled
(
true
);
// webSettings.setDatabasePath(HcAppliContext.get().filesDir.absolutePath + "/webcache");
// API 7, Web SQL Database, 需要重载方法(WebChromeClient)才能生效,无法只通过反射实现
}
catch
(
Exception
e
)
{
}
webView
.
setWebChromeClient
(
new
WebChromeClient
(){
@Override
public
boolean
onCreateWindow
(
WebView
view
,
boolean
isDialog
,
boolean
isUserGesture
,
Message
resultMsg
)
{
WebView
.
WebViewTransport
transport
=
(
WebView
.
WebViewTransport
)
resultMsg
.
obj
;
transport
.
setWebView
(
webView
);
resultMsg
.
sendToTarget
();
return
true
;
}
});
webView
.
setDownloadListener
(
new
DownloadListener
()
{
@Override
public
void
onDownloadStart
(
String
url
,
String
userAgent
,
String
contentDisposition
,
String
mimetype
,
long
contentLength
)
{
Intent
intent
=
new
Intent
(
Intent
.
ACTION_VIEW
);
intent
.
addCategory
(
Intent
.
CATEGORY_BROWSABLE
);
intent
.
setData
(
Uri
.
parse
(
url
));
startActivity
(
intent
);
}
});
webView
.
setWebViewClient
(
new
WebViewClient
()
{
@Override
public
boolean
shouldOverrideUrlLoading
(
WebView
view
,
String
url
)
{
if
(
url
!=
null
){
if
(
shouldOverrideUrlLoadingByApp
(
url
))
{
return
true
;
}
}
return
super
.
shouldOverrideUrlLoading
(
view
,
url
);
}
});
}
private
void
initTitle
()
{
findViewById
(
R
.
id
.
iv_user_toolbar_back
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
finish
();
}
});
}
@Override
protected
void
onResume
()
{
super
.
onResume
();
if
(
webView
!=
null
)
{
webView
.
loadUrl
(
"javascript:onResume()"
);
}
}
@Override
protected
void
onPause
()
{
super
.
onPause
();
if
(
webView
!=
null
)
{
webView
.
loadUrl
(
"javascript:onPause()"
);
}
}
@Override
protected
void
onDestroy
()
{
super
.
onDestroy
();
if
(
webView
!=
null
)
{
webView
.
destroy
();
}
}
private
boolean
shouldOverrideUrlLoadingByApp
(
String
url
){
try
{
if
(!
url
.
startsWith
(
"http"
)
&&
!
url
.
startsWith
(
"https"
)
&&
!
url
.
startsWith
(
"ftp"
))
{
Intent
intent
=
new
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
url
));
if
(
isInstall
(
intent
))
{
this
.
startActivity
(
intent
);
return
true
;
}
}
else
{
return
false
;
}
}
catch
(
Exception
e
)
{
return
false
;
}
return
false
;
}
//判断app是否安装
public
static
Boolean
isInstall
(
Intent
intent
)
{
return
false
;
}
}
\ No newline at end of file
Assets/Base/UnityTool/Plugins/Android/webview/UnityWebActivity.java.meta
deleted
100644 → 0
View file @
58d7062f
fileFormatVersion: 2
guid: 8c70ddc179db3e64192da43e41d152d9
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings: {}
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
Assets/Plugins/Android/res/layout/unity_activity_web.xml
deleted
100644 → 0
View file @
58d7062f
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/id_rl_toolbar"
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
>
<ImageView
android:id=
"@+id/iv_user_toolbar_back"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_centerVertical=
"true"
android:paddingLeft=
"12dp"
android:paddingRight=
"12dp"
android:src=
"@mipmap/arrow_left"
/>
<TextView
android:id=
"@+id/tv_user_toolbar_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:textColor=
"#000000"
android:textSize=
"20sp"
android:textStyle=
"bold"
/>
</RelativeLayout>
<com.ym.unityandroid.webview.UnityCustomWebView
android:id=
"@+id/activity_webview"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</LinearLayout>
\ No newline at end of file
Assets/Plugins/Android/res/layout/unity_activity_web.xml.meta
deleted
100644 → 0
View file @
58d7062f
fileFormatVersion: 2
guid: 15ef9b5fad1b531438af19bdbda506e4
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Plugins/Android/res/mipmap-xhdpi.meta
deleted
100644 → 0
View file @
58d7062f
fileFormatVersion: 2
guid: 823eccbbcfeb9bd49907b19a89b23d24
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Plugins/Android/res/mipmap-xhdpi/arrow_left.png
deleted
100644 → 0
View file @
58d7062f
438 Bytes
Assets/Plugins/Android/res/mipmap-xhdpi/arrow_left.png.meta
deleted
100644 → 0
View file @
58d7062f
fileFormatVersion: 2
guid: 4e2628f00351e354eb2f11b4904388fb
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Plugins/Android/res/xml/wn_file_paths.xml
deleted
100644 → 0
View file @
58d7062f
<?xml version="1.0" encoding="utf-8"?>
<paths
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!--为了适配所有路径可以设置 path = "." -->
<external-path
name=
"download"
path=
"."
/>
<external-files-path
name=
"external_file"
path=
"."
/>
<external-cache-path
name=
"external_cache"
path=
"."
/>
<files-path
name=
"files"
path=
"."
/>
<cache-path
name=
"cache"
path=
"."
/>
</paths>
Assets/Plugins/Android/res/xml/wn_file_paths.xml.meta
deleted
100644 → 0
View file @
58d7062f
fileFormatVersion: 2
guid: a0ab4bd32e8dc744f82d0dcd762eab51
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/Controllers/GameController.cs
View file @
abf592aa
...
...
@@ -25,37 +25,4 @@ public class GameController : MonoBehaviour
//红线高度
public
float
RedLinePosY
=>
ColliderAdapter
.
Instance
.
RedLinePosY
;
<<<<<<<
HEAD
/// <summary>
/// 获取接下来将要掉落的音符组及所属歌曲
/// </summary>
public
void
GetNextNoteList
(
int
song_id
)
{
Dictionary
<
string
,
object
>
paras
=
new
Dictionary
<
string
,
object
>();
paras
.
Add
(
"song_id"
,
song_id
);
HttpTool
.
Instance
.
_Get
(
"app/v1/watermelon/notes"
,
paras
,
new
Action
<
List
<
string
>>((
result
)
=>
{
Debug
.
unityLogger
.
Log
(
""
);
}),
new
Action
<
string
,
string
>((
code
,
msg
)
=>
{
Debug
.
unityLogger
.
Log
(
"获取下一组生成的球 "
+
code
+
" msg "
+
msg
);
}));
}
=======
/// <summary>
/// 获取提现列表
/// 类型(1 合成提现,3大额提现)
/// </summary>
public
void
GetWithdrawList
(
int
type
)
{
Dictionary
<
string
,
object
>
paras
=
new
Dictionary
<
string
,
object
>();
paras
.
Add
(
"type"
,
type
);
HttpTool
.
Instance
.
_Get
(
"app/v1/watermelon/list_wd"
,
paras
,
new
Action
<
WithDrawBean
>((
result
)
=>
{
>>>>>>>
71
cb07ae8564a188b735be49fa9ff46c44542906
}
Assets/Scripts/Main/HomeInfoControl.cs
View file @
abf592aa
...
...
@@ -27,14 +27,6 @@ public class HomeInfoControl : MonoBehaviour
#endif
EventCenter
.
Getinstance
().
EventTrigger
(
"RegisterPanel"
);
<<<<<<<
HEAD
//GameController.GetInstance().GetWithdrawList(1);
GameController
.
GetInstance
().
GetReward
();
=======
GameController
.
GetInstance
().
GetWithdrawList
(
1
);
>>>>>>>
71
cb07ae8564a188b735be49fa9ff46c44542906
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment