Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
W
wdlc_mjb_unity
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
王雪伟
wdlc_mjb_unity
Commits
4b67e5c9
Commit
4b67e5c9
authored
Jun 09, 2021
by
zhangzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
手速红包
parent
732644fe
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
1349 additions
and
407 deletions
+1349
-407
CSJ.meta
Assets/AdSDK/AD/CSJ.meta
+3
-2
SourceHanSansCN-Bold.otf
Assets/Game/Main/Font/SourceHanSansCN-Bold.otf
+0
-0
SourceHanSansCN-Bold.otf.meta
Assets/Game/Main/Font/SourceHanSansCN-Bold.otf.meta
+23
-0
SourceHanSansCN-Medium.ttf
Assets/Game/Main/Font/SourceHanSansCN-Medium.ttf
+0
-0
SourceHanSansCN-Medium.ttf.meta
Assets/Game/Main/Font/SourceHanSansCN-Medium.ttf.meta
+22
-0
HandSpeedRedPacketItem.prefab
Assets/Game/Main/Prefabs/HandSpeedRedPacketItem.prefab
+0
-373
HSRPGetDialog.meta
Assets/Game/Main/Resource/ui/dialog/HSRPGetDialog.meta
+8
-0
底.png
Assets/Game/Main/Resource/ui/dialog/HSRPGetDialog/底.png
+0
-0
底.png.meta
Assets/Game/Main/Resource/ui/dialog/HSRPGetDialog/底.png.meta
+92
-0
开心收下.png
Assets/Game/Main/Resource/ui/dialog/HSRPGetDialog/开心收下.png
+0
-0
开心收下.png.meta
.../Game/Main/Resource/ui/dialog/HSRPGetDialog/开心收下.png.meta
+92
-0
横幅.png
Assets/Game/Main/Resource/ui/dialog/HSRPGetDialog/横幅.png
+0
-0
横幅.png.meta
...ts/Game/Main/Resource/ui/dialog/HSRPGetDialog/横幅.png.meta
+92
-0
CrazyCar.unity
Assets/Game/Main/Scenes/CrazyCar.unity
+860
-3
HSRPGetDialog.cs
...Main/Scripts/Item/HandSpeedRedPacketItem/HSRPGetDialog.cs
+40
-0
HSRPGetDialog.cs.meta
...Scripts/Item/HandSpeedRedPacketItem/HSRPGetDialog.cs.meta
+11
-0
HSRPVM.cs
...s/Game/Main/Scripts/Item/HandSpeedRedPacketItem/HSRPVM.cs
+71
-0
HSRPVM.cs.meta
...e/Main/Scripts/Item/HandSpeedRedPacketItem/HSRPVM.cs.meta
+11
-0
HandSpeedRedPacketItem.cs
...pts/Item/HandSpeedRedPacketItem/HandSpeedRedPacketItem.cs
+24
-29
No files found.
Assets/
Game/Main/Prefabs/HandSpeedRedPacketItem.prefab
.meta
→
Assets/
AdSDK/AD/CSJ
.meta
View file @
4b67e5c9
fileFormatVersion: 2
guid: db76c39f755654664a45530e2dc02f0d
PrefabImporter:
guid: 047afee41e5ea4041b38650dde06204e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
...
...
Assets/Game/Main/Font/SourceHanSansCN-Bold.otf
0 → 100644
View file @
4b67e5c9
File added
Assets/Game/Main/Font/SourceHanSansCN-Bold.otf.meta
0 → 100644
View file @
4b67e5c9
fileFormatVersion: 2
guid: 66d2f797a9d094b3598e5816d772b676
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontName: Source Han Sans CN
fontNames:
- Source Han Sans CN
fallbackFontReferences:
- {fileID: 12800000, guid: 532935772d93543b6ad5b00a928141f1, type: 3}
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:
Assets/Game/Main/Font/SourceHanSansCN-Medium.ttf
0 → 100644
View file @
4b67e5c9
File added
Assets/Game/Main/Font/SourceHanSansCN-Medium.ttf.meta
0 → 100644
View file @
4b67e5c9
fileFormatVersion: 2
guid: 532935772d93543b6ad5b00a928141f1
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontName: Source Han Sans CN
fontNames:
- Source Han Sans CN
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:
Assets/Game/Main/Prefabs/HandSpeedRedPacketItem.prefab
deleted
100644 → 0
View file @
732644fe
This diff is collapsed.
Click to expand it.
Assets/Game/Main/Resource/ui/dialog/HSRPGetDialog.meta
0 → 100644
View file @
4b67e5c9
fileFormatVersion: 2
guid: 0558eb6561e6248da921dfc2dc4fee78
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Game/Main/Resource/ui/dialog/HSRPGetDialog/底.png
0 → 100644
View file @
4b67e5c9
167 KB
Assets/Game/Main/Resource/ui/dialog/HSRPGetDialog/底.png.meta
0 → 100644
View file @
4b67e5c9
fileFormatVersion: 2
guid: 255f6234fe21c4b299c8091085b4f763
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Assets/Game/Main/Resource/ui/dialog/HSRPGetDialog/开心收下.png
0 → 100644
View file @
4b67e5c9
35.6 KB
Assets/Game/Main/Resource/ui/dialog/HSRPGetDialog/开心收下.png.meta
0 → 100644
View file @
4b67e5c9
fileFormatVersion: 2
guid: 0d1d822fe5a9a4640af343b08ba37baa
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Assets/Game/Main/Resource/ui/dialog/HSRPGetDialog/横幅.png
0 → 100644
View file @
4b67e5c9
66.5 KB
Assets/Game/Main/Resource/ui/dialog/HSRPGetDialog/横幅.png.meta
0 → 100644
View file @
4b67e5c9
fileFormatVersion: 2
guid: 4d4a28df2f2414edc96f1e70c9f9216b
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Assets/Game/Main/Scenes/CrazyCar.unity
View file @
4b67e5c9
This diff is collapsed.
Click to expand it.
Assets/Game/Main/Scripts/Item/HandSpeedRedPacketItem/HSRPGetDialog.cs
0 → 100644
View file @
4b67e5c9
using
System
;
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine.UI
;
/// <summary>
/// 手速红包获得奖励弹窗
/// </summary>
public
class
HSRPGetDialog
:
MonoBehaviour
{
/// <summary>
/// 钱数文字
/// </summary>
public
Text
MoneyText
;
private
void
OnEnable
()
{
AdUtils
.
showFeedAd
(
"HandSpeedRedPacketFeedAd"
);
}
/// <summary>
/// 设置控件数据
/// </summary>
public
void
SetUpSubviews
(
HSRPGetRewardModel
dataModel
)
{
MoneyText
.
text
=
"¥"
+
dataModel
.
cashYuan
;
}
/// <summary>
/// 开心收下按钮点击事件
/// </summary>
public
void
DidSelectedTakeButton
()
{
HSRPVM
.
RequestInternetForTakeReward
();
gameObject
.
SetActive
(
false
);
}
}
Assets/Game/Main/Scripts/Item/HandSpeedRedPacketItem/HSRPGetDialog.cs.meta
0 → 100644
View file @
4b67e5c9
fileFormatVersion: 2
guid: 6a56630840185499e9865e7d0ff725c0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Game/Main/Scripts/Item/HandSpeedRedPacketItem/HSRPVM.cs
0 → 100644
View file @
4b67e5c9
using
System
;
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
/// <summary>
/// 手速红包数据类
/// </summary>
public
class
HSRPVM
:
MonoBehaviour
{
/// <summary>
/// 手速红包奖励数据
/// </summary>
public
static
HSRPGetRewardModel
getRewardModel
;
/// <summary>
/// 获取手速红包奖励网络请求
/// </summary>
public
static
void
RequestInternetForGetReward
()
{
HttpTool
.
Instance
.
_Get
(
"app/v1/game/module/handSpeedRed/get"
,
null
,
new
Action
<
HSRPGetRewardModel
>((
bean
)
=>
{
getRewardModel
=
bean
;
}),
new
Action
<
string
,
string
>((
code
,
errMsg
)
=>
{
Debug
.
unityLogger
.
Log
(
"获取手速红包奖励网络请求失败"
+
code
+
errMsg
);
}));
}
/// <summary>
/// 领取手速红包奖励网络请求
/// </summary>
public
static
void
RequestInternetForTakeReward
()
{
HttpTool
.
Instance
.
_Post
(
"app/v1/game/module/handSpeedRed/reward"
,
null
,
new
Action
<
EmptyModel
>((
bean
)
=>
{
// 领取后请求获取奖励接口, 预加载
RequestInternetForGetReward
();
}),
new
Action
<
string
,
string
>((
code
,
errMsg
)
=>
{
Debug
.
unityLogger
.
Log
(
"领取手速红包奖励网络请求失败"
+
code
+
errMsg
);
}));
}
}
/// <summary>
/// 手速红包获取奖励数据类
/// </summary>
public
class
HSRPGetRewardModel
{
/// <summary>
/// 奖励金额(单位: 分)
/// </summary>
public
int
cash
;
/// <summary>
/// 是否显示弹窗
/// 0 : 不显示
/// 1 : 显示
/// </summary>
public
int
showAd
;
/// <summary>
/// 奖励金额(单位: 元)
/// </summary>
public
double
cashYuan
;
}
Assets/Game/Main/Scripts/Item/HandSpeedRedPacketItem/HSRPVM.cs.meta
0 → 100644
View file @
4b67e5c9
fileFormatVersion: 2
guid: 560a5acc2e9944e55b62c77144bd10f8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Game/Main/Scripts/Item/HandSpeedRedPacketItem/HandSpeedRedPacketItem.cs
View file @
4b67e5c9
...
...
@@ -40,9 +40,14 @@ public class HandSpeedRedPacketItem : MonoBehaviour
/// </summary>
private
float
currentProgress
;
/// <summary>
/// 手速红包领取奖励弹窗
/// </summary>
public
GameObject
HSRPGetDialog
;
private
void
Awake
()
{
RequestInternetForGetReward
();
HSRPVM
.
RequestInternetForGetReward
();
}
private
void
Update
()
...
...
@@ -52,51 +57,41 @@ public class HandSpeedRedPacketItem : MonoBehaviour
if
(
currentProgress
>=
1
)
{
currentProgress
=
0
;
EventCenter
.
Broadcast
(
MyEventType
.
HSRP_FlyRedPacket
);
GetRedPacket
();
}
currentProgress
=
Mathf
.
Clamp
(
currentProgress
-
dropSpeed
*
Time
.
deltaTime
,
0
,
1
);
}
/// <summary>
///
获取手速红包奖励网络请求
///
手速红包点击事件
/// </summary>
private
void
RequestInternetForGetReward
()
{
HttpTool
.
Instance
.
_Get
(
"app/v1/game/module/handSpeedRed/get"
,
null
,
new
Action
<
EmptyModel
>((
bean
)
=>
public
void
DidSelectedItem
()
{
Instantiate
(
HSRPEffectPrefab
,
transform
);
}),
new
Action
<
string
,
string
>((
code
,
errMsg
)
=>
{
Debug
.
unityLogger
.
Log
(
"获取手速红包奖励网络请求失败"
+
code
+
errMsg
);
}));
currentProgress
=
Mathf
.
Clamp
(
currentProgress
+
addSpeed
,
0
,
1
);
}
/// <summary>
///
领取手速红包奖励网络请求
///
进度条点满, 获取红包方法
/// </summary>
private
void
RequestInternetForTakeReward
()
{
HttpTool
.
Instance
.
_Get
(
"app/v1/game/module/handSpeedRed/reward"
,
null
,
new
Action
<
EmptyModel
>((
bean
)
=>
private
void
GetRedPacket
()
{
currentProgress
=
0
;
EventCenter
.
Broadcast
(
MyEventType
.
HSRP_FlyRedPacket
);
}),
new
Action
<
string
,
string
>((
code
,
errMsg
)
=>
if
(
HSRPVM
.
getRewardModel
.
showAd
!=
0
)
{
Debug
.
unityLogger
.
Log
(
"领取手速红包奖励网络请求失败"
+
code
+
errMsg
);
}));
}
HSRPGetDialog
.
SetActive
(
true
);
/// <summary>
/// 手速红包点击事件
/// </summary>
public
void
DidSelectedItem
()
HSRPGetDialog
script
=
HSRPGetDialog
.
GetComponent
<
HSRPGetDialog
>();
script
.
SetUpSubviews
(
HSRPVM
.
getRewardModel
);
}
else
{
GameObject
gb
=
Instantiate
(
HSRPEffectPrefab
,
transform
);
currentProgress
=
Mathf
.
Clamp
(
currentProgress
+
addSpeed
,
0
,
1
);
HSRPVM
.
RequestInternetForTakeReward
();
}
}
}
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