Commit 473f69ef authored by maxiaoliang's avatar maxiaoliang

修改动画效果和ui

parent eefe9b12
......@@ -30,7 +30,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 2
value: 1
inSlope: 0
outSlope: 0
......@@ -58,7 +58,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 2
value: 1
inSlope: 0
outSlope: 0
......@@ -86,7 +86,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 2
value: 1
inSlope: 0
outSlope: 0
......@@ -114,7 +114,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.5
time: 1
value: 0
inSlope: 0
outSlope: 0
......@@ -123,7 +123,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 2
value: 1
inSlope: 0
outSlope: 0
......@@ -139,7 +139,7 @@ AnimationClip:
classID: 114
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_PPtrCurves: []
m_SampleRate: 60
m_SampleRate: 30
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
......@@ -180,7 +180,7 @@ AnimationClip:
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1
m_StopTime: 2
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
......@@ -209,7 +209,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 2
value: 1
inSlope: 0
outSlope: 0
......@@ -237,7 +237,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 2
value: 1
inSlope: 0
outSlope: 0
......@@ -265,7 +265,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 2
value: 1
inSlope: 0
outSlope: 0
......@@ -293,7 +293,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.5
time: 1
value: 0
inSlope: 0
outSlope: 0
......@@ -302,7 +302,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 2
value: 1
inSlope: 0
outSlope: 0
......
......@@ -22,7 +22,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: -62
value: -202
inSlope: 0
outSlope: 0
tangentMode: 136
......@@ -235,7 +235,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: -62
value: -202
inSlope: 0
outSlope: 0
tangentMode: 136
......
fileFormatVersion: 2
guid: 7b14def5b10e64b8cb31a048c57ed8b1
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontName: zihun151hao-lianmengzongyiti
fontNames:
- zihun151hao-lianmengzongyiti
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:
......@@ -285,7 +285,7 @@ CanvasGroup:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 455528767290619782}
m_Enabled: 1
m_Alpha: 0
m_Alpha: 1
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
......@@ -1389,7 +1389,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -54.4}
m_AnchoredPosition: {x: -32, y: -36}
m_SizeDelta: {x: 202, y: 35}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &455528768205073264
......@@ -1853,7 +1853,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &259696605779131939
RectTransform:
m_ObjectHideFlags: 0
......@@ -1870,7 +1870,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -2, y: 14}
m_AnchoredPosition: {x: -2, y: 27}
m_SizeDelta: {x: 345, y: 255}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5770000278109398240
......
fileFormatVersion: 2
guid: 6af2c582097d10e41b5b9f381f565c8c
guid: 64f547b0a25c64bd3b63eeba23a3ef4e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
......
fileFormatVersion: 2
guid: 89b5232c116451f44b2f0e1a2e784b03
guid: 991244ea250af4b5aadfc583bf994e49
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
......
fileFormatVersion: 2
guid: 439b00e9d97554a1480582443b1cc5bc
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.
......@@ -122,4 +122,6 @@ public enum MyEventType
END_LAND_LIGHT,
//单个车播放动画
ONE_CAR_PLAY_ANIMAL,
//获得金币飞动画
GET_COIN_FLY,
}
......@@ -280,6 +280,7 @@ public class DialogControl : MonoBehaviour
rewardDialogObj.SetActive(false);
AudioUtils.ins.PlayBtnAudio();
AdUtils.CloseFeedAd();
EventCenter.Broadcast(MyEventType.GET_COIN_FLY);
}
......
......@@ -71,7 +71,7 @@ public class DoubleIncomeDialog : MonoBehaviour
AdUtils.PlayRewardAd("fkqcw_protection", new Action<bool>((cb) =>
{
EventUtils.OnEvent("rewardVideo_doubleIncome");
EventUtils.OnEvent("rewardVideo_all");
EventUtils.OnEvent("doubling_reward");
if (cb)
{
HttpTool.Instance._Post("app/v1/game/fkqcw/doubling/incr_time_by_video", null, new Action<VideoStatusBean>((bean) =>
......
......@@ -23,6 +23,7 @@ public class GoldInsufficientControl : MonoBehaviour
HttpTool.Instance._Post("app/v3/game/fkqcw/parking/addCoin", null, new Action<WithdrawShopBean>((bean) =>
{
GameObject.Find("Dialog").GetComponent<DialogControl>().closeGoldInsufficientDialog();
EventCenter.Broadcast(MyEventType.GET_COIN_FLY);
GameObject.Find("Main").GetComponent<HomeInfoControl>().OnUpdateCarListData();
}), new Action<string, string>((code, errMsg) =>
{
......
......@@ -21,7 +21,8 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
public RawImage avatar;
public GameObject shouyi_animal;
public GameObject img_pig_cash_trips;
public GameObject flycoin;
public GameObject Protv;
private void Awake()
{
mPresenter = new HomePresenter(this);
......@@ -30,13 +31,33 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
EventCenter.AddListener<int>(MyEventType.ADD_COIN, OnAddCoin);
EventCenter.AddListener(MyEventType.START_DOUBLE_INCOME_ANIMATION, startDoubleIncomeAnimal);
EventCenter.AddListener(MyEventType.STOP_DOUBLE_INCOME_ANIMATION, stoptDoubleIncomeAnimal);
EventCenter.AddListener(MyEventType.GET_COIN_FLY, flyCoin);
startCountDown();
if (PrefenceUtils.GetInstance().getIsFirst() == 0) {
PrefenceUtils.GetInstance().setIsFirst(1);
EventUtils.OnEvent("home_first");
}
}
private void flyCoin()
{
flycoin.SetActive(true);
for (int i = 0; i < 6; i++)
{
StartCoroutine(MoveVideoRedPack(flycoin.transform.localPosition, i * 0.2f));
}
}
IEnumerator MoveVideoRedPack(Vector3 vector3, float v)
{
yield return new WaitForSeconds(v);
GameObject grid = Instantiate(flycoin, transform);
grid.transform.SetAsLastSibling();
grid.transform.localPosition = vector3;
grid.GetComponent<HomeFlyCoin>().OnFlyRedBack();
}
private void startDoubleIncomeAnimal()
{
shouyi_animal.SetActive(true);
......@@ -53,6 +74,7 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
EventCenter.RemoveListener<int>(MyEventType.ADD_COIN, OnAddCoin);
EventCenter.RemoveListener(MyEventType.START_DOUBLE_INCOME_ANIMATION, startDoubleIncomeAnimal);
EventCenter.RemoveListener(MyEventType.STOP_DOUBLE_INCOME_ANIMATION, stoptDoubleIncomeAnimal);
EventCenter.RemoveListener(MyEventType.GET_COIN_FLY, flyCoin);
}
private void Start()
......@@ -120,13 +142,12 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
tvrewardCashEveryMinute.text = "约"+mCarInfo.rewardCashEveryMinute.ToString()+ "元/分钟";
levelTv.text = "Lv:"+mCarInfo.levelProgress.level;
withdrawBoxText.text = mCarInfo.wdTitle;
startCountDown();
}
private int time = 5;
private void startCountDown()
{
Debug.Log("开始计时");
StartCoroutine(showPigTrip());
}
......@@ -167,6 +188,7 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
if (protectionTime > 0)
{
procetTimeObj.SetActive(true);
Protv.SetActive(false);
proTimerTv.text = UnityUtil.getCountdown(protectionTime);
protionControl = StartCoroutine(IEProctionIimer());
......@@ -174,6 +196,7 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
else
{
procetTimeObj.SetActive(false);
Protv.SetActive(true);
}
}
......@@ -186,12 +209,14 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
{
procetTimeObj.SetActive(false);
Protv.SetActive(true);
EventCenter.Broadcast(MyEventType.CLOSE_PROCTION);
StopCoroutine(protionControl);
break;
}
else
{
protectionTime--;
proTimerTv.text = UnityUtil.getCountdown(protectionTime);
}
......
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using UnityEngine;
public class HomeFlyCoin : MonoBehaviour
{
public GameObject targetObj;//飞行目标
public GameObject highcavs;
public GameObject lowcavs;
public void OnFlyRedBack()
{
transform.parent = highcavs.transform.parent;
transform.DOMove(targetObj.transform.position, 0.8f).OnComplete(AnimEnd);
//GameObject.Find("Music_Background").GetComponent<MusicControl>().playGetRedPackageAudio();
}
public void OnFlyPigBank()
{
transform.DOMove(targetObj.transform.position, 0.8f).OnComplete(AnimEnd);
}
private void AnimEnd()
{
transform.parent = lowcavs.transform.parent;
Destroy(transform.gameObject);
//AudioUtils.ins.PlayGetAudio();
}
}
fileFormatVersion: 2
guid: 260fe0269e92c4842ae7f6cde5bd7c76
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
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