Commit bb227c45 authored by zxhljwl's avatar zxhljwl

修改

parent 254b2510
...@@ -205,5 +205,27 @@ public class PrefenceUtils ...@@ -205,5 +205,27 @@ public class PrefenceUtils
PlayerPrefs.SetString(token,t); PlayerPrefs.SetString(token,t);
PlayerPrefs.SetString(uid, u); PlayerPrefs.SetString(uid, u);
} }
private string WxAvatar = "WxAvatar";
public void setWxAvatar(string wxAvatar)
{
PlayerPrefs.SetString(WxAvatar, wxAvatar);
}
public string getWxAvatar()
{
return PlayerPrefs.GetString(WxAvatar, "");
}
private string WxName = "WxName";
public void setWxName(string wxName)
{
PlayerPrefs.SetString(WxName, wxName);
}
public string getWxName()
{
return PlayerPrefs.GetString(WxName, "");
}
} }
fileFormatVersion: 2
guid: 6975295f7bda391489555a844382feaa
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 0dde6bfe54918c54babaa3c457a7f768
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:
fileFormatVersion: 2
guid: 190a110d5a52a4a48ab1f89512c3f9fe
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:
fileFormatVersion: 2
guid: f277156def3e5024fb8b00120d16c187
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:
fileFormatVersion: 2
guid: bdd410ef31e40da4c8dba9b68305a246
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:
fileFormatVersion: 2
guid: df1020576ef47a34590bb4be31fd829d
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:
fileFormatVersion: 2
guid: 190e3ce79e92d5c4abf99b5b810f8a2a
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:
This diff is collapsed.
...@@ -56,6 +56,9 @@ public class ParkInfoBean ...@@ -56,6 +56,9 @@ public class ParkInfoBean
{ {
public int level; public int level;
} }
public string headImage;
public string nickName;
} }
[Serializable] [Serializable]
public class ParkingSpace public class ParkingSpace
......
...@@ -19,6 +19,7 @@ public class DialogControl : MonoBehaviour ...@@ -19,6 +19,7 @@ public class DialogControl : MonoBehaviour
public GameObject GetRedHeart, PlayDesc; public GameObject GetRedHeart, PlayDesc;
public Text tv_heart_num; public Text tv_heart_num;
private static Dictionary<string, object> parm = new Dictionary<string, object>(); private static Dictionary<string, object> parm = new Dictionary<string, object>();
private void Awake() private void Awake()
{ {
EventCenter.AddListener<VideoStatusBean>(MyEventType.WATET_DIALOG, OnUseWaterByVideo); EventCenter.AddListener<VideoStatusBean>(MyEventType.WATET_DIALOG, OnUseWaterByVideo);
...@@ -400,4 +401,15 @@ public class DialogControl : MonoBehaviour ...@@ -400,4 +401,15 @@ public class DialogControl : MonoBehaviour
AudioUtils.ins.PlayBtnAudio(); AudioUtils.ins.PlayBtnAudio();
PlayDesc.SetActive(false); PlayDesc.SetActive(false);
} }
public GameObject GoldInsufficientDialog;
public void showGoldInsufficientDialog()
{
GoldInsufficientDialog.SetActive(true);
}
public void closeGoldInsufficientDialog()
{
GoldInsufficientDialog.SetActive(false);
}
} }
using UnityEngine;
using UnityEngine.UI;
public class GoldInsufficientControl : MonoBehaviour
{
public Text GoldNumber;
public void setData(int goldNumber)
{
GoldNumber.text = goldNumber + "";
}
/**
* 立即领取
*/
public void receive()
{
}
}
fileFormatVersion: 2
guid: e0bb5b6ba78cb3e45813c9a994c551b4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
...@@ -82,6 +82,8 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View ...@@ -82,6 +82,8 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
public void ParkInfo(ParkInfoBean mCarInfo) public void ParkInfo(ParkInfoBean mCarInfo)
{ {
PrefenceUtils.GetInstance().setWxAvatar(mCarInfo.headImage);
PrefenceUtils.GetInstance().setWxName(mCarInfo.nickName);
coinNum = mCarInfo.avaCoin; coinNum = mCarInfo.avaCoin;
CoinNumTV.text = UnityUtil.TransUnit(coinNum); CoinNumTV.text = UnityUtil.TransUnit(coinNum);
PlayerDataControl.Instance.AllSpeedTime = mCarInfo.allSpeedUpReduceMinute; PlayerDataControl.Instance.AllSpeedTime = mCarInfo.allSpeedUpReduceMinute;
......
using System.Collections; using System.Collections;
using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.UI; using UnityEngine.UI;
public class SettingControl : MonoBehaviour public class SettingControl : MonoBehaviour
{ {
public GameObject notifOpen, notifClose; //public GameObject notifOpen, notifClose;
public Text UserIdTv; public RawImage avatar;
public Text WxNameTv, UserIdTv;
public Text QQTv; public Text QQTv;
private string NotifIsOpen = "NOTIF_IS_OPEN"; private string NotifIsOpen = "NOTIF_IS_OPEN";
...@@ -15,16 +16,18 @@ public class SettingControl : MonoBehaviour ...@@ -15,16 +16,18 @@ public class SettingControl : MonoBehaviour
private void Awake() private void Awake()
{ {
if (PlayerPrefs.GetInt(NotifIsOpen, 0) == 0) //if (PlayerPrefs.GetInt(NotifIsOpen, 0) == 0)
{ //{
notifOpen.SetActive(true); // notifOpen.SetActive(true);
} //}
else //else
{ //{
notifClose.SetActive(true); // notifClose.SetActive(true);
} //}
UserIdTv.text = "ID:" + PrefenceUtils.GetInstance().getUid(); StartCoroutine(setUrlImage(avatar, PrefenceUtils.GetInstance().getWxName()));
QQTv.text = "官方QQ群:"+PlayerDataControl.Instance.MyQQ; WxNameTv.text = "微信名:" + PrefenceUtils.GetInstance().getWxName();
UserIdTv.text = "用户ID:" + PrefenceUtils.GetInstance().getUid();
QQTv.text = PlayerDataControl.Instance.MyQQ;
} }
/// <summary> /// <summary>
...@@ -42,8 +45,8 @@ public class SettingControl : MonoBehaviour ...@@ -42,8 +45,8 @@ public class SettingControl : MonoBehaviour
public void OnClickOpenNotif() public void OnClickOpenNotif()
{ {
AudioUtils.ins.PlayBtnAudio(); AudioUtils.ins.PlayBtnAudio();
notifOpen.SetActive(false); //notifOpen.SetActive(false);
notifClose.SetActive(true); //notifClose.SetActive(true);
PlayerPrefs.SetInt(NotifIsOpen, 1); PlayerPrefs.SetInt(NotifIsOpen, 1);
} }
/// <summary> /// <summary>
...@@ -52,8 +55,8 @@ public class SettingControl : MonoBehaviour ...@@ -52,8 +55,8 @@ public class SettingControl : MonoBehaviour
public void OnClickCloseNotif() public void OnClickCloseNotif()
{ {
AudioUtils.ins.PlayBtnAudio(); AudioUtils.ins.PlayBtnAudio();
notifOpen.SetActive(true); //notifOpen.SetActive(true);
notifClose.SetActive(false); //notifClose.SetActive(false);
PlayerPrefs.SetInt(NotifIsOpen, 0); PlayerPrefs.SetInt(NotifIsOpen, 0);
} }
...@@ -76,4 +79,21 @@ public class SettingControl : MonoBehaviour ...@@ -76,4 +79,21 @@ public class SettingControl : MonoBehaviour
Debug.unityLogger.Log("关于我们"); Debug.unityLogger.Log("关于我们");
CallLocalFunUtil.Instance.OpenWebPage(PlayerDataControl.Instance.AboutUsUrl, "关于我们"); CallLocalFunUtil.Instance.OpenWebPage(PlayerDataControl.Instance.AboutUsUrl, "关于我们");
} }
/**
* 显示url图片
*/
private IEnumerator setUrlImage(RawImage image, string url)
{
UnityWebRequest www = UnityWebRequestTexture.GetTexture(url);
yield return www.SendWebRequest();
if (www.isNetworkError || www.isHttpError)
{
Debug.Log(www.error);
}
else
{
image.texture = DownloadHandlerTexture.GetContent(www);//获取并创建Texture
}
}
} }
...@@ -9,11 +9,11 @@ public class StickMoneyPanel : MonoBehaviour, StickContract.View ...@@ -9,11 +9,11 @@ public class StickMoneyPanel : MonoBehaviour, StickContract.View
{ {
public GameObject ListParent;//列表父级 public GameObject ListParent;//列表父级
public GameObject ListItem;//列表条目 public GameObject ListItem;//列表条目
public Text StickTimeTv; //public Text StickTimeTv;
public Image StickTimeProgress; //public Image StickTimeProgress;
public Image BgImg;//背景图片,用于计算移动高度 public Image BgImg;//背景图片,用于计算移动高度
public GameObject ShieldingTimer;//保护罩延时 //public GameObject ShieldingTimer;//保护罩延时
public GameObject Shielding;//获得保护罩 //public GameObject Shielding;//获得保护罩
public HomeInfoControl homeInfo; public HomeInfoControl homeInfo;
...@@ -66,14 +66,14 @@ public class StickMoneyPanel : MonoBehaviour, StickContract.View ...@@ -66,14 +66,14 @@ public class StickMoneyPanel : MonoBehaviour, StickContract.View
//获得保护罩 //获得保护罩
public void OnClickShielding() public void OnClickShielding()
{ {
Debug.unityLogger.Log("获得保护罩"); //Debug.unityLogger.Log("获得保护罩");
mPresenter.GetShieldingTime(); //mPresenter.GetShieldingTime();
} }
//保护罩延时 //保护罩延时
public void OnClickShieldingTime() public void OnClickShieldingTime()
{ {
Debug.unityLogger.Log("保护罩延时"); //Debug.unityLogger.Log("保护罩延时");
mPresenter.GetShieldingTime(); //mPresenter.GetShieldingTime();
} }
...@@ -104,23 +104,23 @@ public class StickMoneyPanel : MonoBehaviour, StickContract.View ...@@ -104,23 +104,23 @@ public class StickMoneyPanel : MonoBehaviour, StickContract.View
time = mStickInfo.protectionCountdownSecond; time = mStickInfo.protectionCountdownSecond;
//主页贴条倒计时 //主页贴条倒计时
homeInfo.SetStickTimer(time); homeInfo.SetStickTimer(time);
if (StickTimeControl != null) //if (StickTimeControl != null)
{ //{
StopCoroutine(StickTimeControl); //StopCoroutine(StickTimeControl);
} //}
if (time == 0) //if (time == 0)
{ //{
ShieldingTimer.SetActive(false); //ShieldingTimer.SetActive(false);
Shielding.SetActive(true); //Shielding.SetActive(true);
} //}
else //else
{ //{
ShieldingTimer.SetActive(true); //ShieldingTimer.SetActive(true);
Shielding.SetActive(false); //Shielding.SetActive(false);
StickTimeProgress.fillAmount = time / (float)TimeTotal; //StickTimeProgress.fillAmount = time / (float)TimeTotal;
StickTimeTv.text = "防护罩剩余时间:" + UnityUtil.getCountdown(time); //StickTimeTv.text = "防护罩剩余时间:" + UnityUtil.getCountdown(time);
StickTimeControl = StartCoroutine(StickTimer()); //StickTimeControl = StartCoroutine(StickTimer());
} //}
} }
...@@ -132,11 +132,11 @@ public class StickMoneyPanel : MonoBehaviour, StickContract.View ...@@ -132,11 +132,11 @@ public class StickMoneyPanel : MonoBehaviour, StickContract.View
if (time <= 0) if (time <= 0)
{ {
time = mStickInfo.addSecond; time = mStickInfo.addSecond;
ShieldingTimer.SetActive(true); //ShieldingTimer.SetActive(true);
Shielding.SetActive(false); //Shielding.SetActive(false);
StickTimeProgress.fillAmount = time / (float)TimeTotal; //StickTimeProgress.fillAmount = time / (float)TimeTotal;
StickTimeTv.text = "防护罩剩余时间:" + UnityUtil.getCountdown(time); //StickTimeTv.text = "防护罩剩余时间:" + UnityUtil.getCountdown(time);
StickTimeControl = StartCoroutine(StickTimer()); //StickTimeControl = StartCoroutine(StickTimer());
} }
else else
{ {
...@@ -156,18 +156,18 @@ public class StickMoneyPanel : MonoBehaviour, StickContract.View ...@@ -156,18 +156,18 @@ public class StickMoneyPanel : MonoBehaviour, StickContract.View
if (time <= 0) if (time <= 0)
{ {
//倒计时结束 //倒计时结束
ShieldingTimer.SetActive(false); //ShieldingTimer.SetActive(false);
Shielding.SetActive(true); //Shielding.SetActive(true);
//关闭上一次倒计时 //关闭上一次倒计时
StopCoroutine(StickTimeControl); //StopCoroutine(StickTimeControl);
break; break;
} }
else else
{ {
time--; time--;
} }
StickTimeProgress.fillAmount = time / (float)TimeTotal; //StickTimeProgress.fillAmount = time / (float)TimeTotal;
StickTimeTv.text = "防护罩剩余时间:" + UnityUtil.getCountdown(time); //StickTimeTv.text = "防护罩剩余时间:" + UnityUtil.getCountdown(time);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment