Commit 26fd574c authored by You're Perfect 's avatar You're Perfect

turn off smile animation for now, fix whale collider

parent 7e66acf8
......@@ -4,13 +4,12 @@ using UnityEngine;
public class Bear : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
public IEnumerator PlayScoreAnimation(int points)
{
Animator anim = GetComponent<Animator>();
anim.SetBool("score", true);
yield return new WaitForSeconds(points);
anim.SetBool("score", false);
}
}
......@@ -11,7 +11,7 @@ public class FishFactory : MonoBehaviour {
public float veryRareFishProbability = 0.001f;
public float delay=60.0f*60.0f;
public bool active=true;
public float rangeVal=3;
public float rangeVal=4;
public Vector2 delayRange = new Vector2 (1, 2);
private static FishFactory Instance;
......
......@@ -133,7 +133,9 @@ public class Mouth : MonoBehaviour {
else
SoundManager.PlayScore();
StartCoroutine(PlayScoreAnimation(player, fish.PointValue));
GameObject playerObject = (player == 1 ? SoundManager.Instance.LeftBear.gameObject : SoundManager.Instance.RightBear.gameObject);
//StartCoroutine(playerObject.GetComponent<Bear>().PlayScoreAnimation(fish.PointValue));
DestroyFish ();
}
......@@ -142,22 +144,10 @@ public class Mouth : MonoBehaviour {
//If whale eats fish, increase timer
coll.GetComponent<Whale>().PlayEatAnimation();
Fish fish = transform.parent.GetComponent("Fish") as Fish;
ScoreManager.TimerTime += fish.PointValue;
ScoreManager.TimerTime += (fish.PointValue*2);
SoundManager.PlayWhale();
DestroyFish ();
}
}
private IEnumerator PlayScoreAnimation(int player, int points)
{
Animator anim;
if (player == 1)
anim = SoundManager.Instance.LeftBear;
else
anim = SoundManager.Instance.RightBear;
anim.SetBool("score", true);
yield return new WaitForSeconds(points);
anim.SetBool("score", false);
}
}
......@@ -3786,7 +3786,7 @@ RectTransform:
m_Children:
- {fileID: 39089640}
m_Father: {fileID: 0}
m_RootOrder: 2
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
......@@ -4736,7 +4736,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 8
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &312587105
GameObject:
......@@ -7409,8 +7409,9 @@ Transform:
m_Children:
- {fileID: 1931222131}
- {fileID: 1845776681}
- {fileID: 1435886715}
m_Father: {fileID: 0}
m_RootOrder: 6
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &478872490
GameObject:
......@@ -8251,7 +8252,7 @@ Transform:
- {fileID: 1067172107}
- {fileID: 1013489031}
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &533341344
GameObject:
......@@ -12050,7 +12051,7 @@ Transform:
- {fileID: 69501735}
- {fileID: 1038225227}
m_Father: {fileID: 0}
m_RootOrder: 7
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &767184313
GameObject:
......@@ -14715,6 +14716,7 @@ GameObject:
- component: {fileID: 1013489031}
- component: {fileID: 1013489033}
- component: {fileID: 1013489032}
- component: {fileID: 1013489034}
m_Layer: 0
m_Name: Right Bear Sprite
m_TagString: Untagged
......@@ -14799,6 +14801,17 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!114 &1013489034
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1013489030}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6fb41bc2c960a474ca178bf920539cf7, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1026637049
GameObject:
m_ObjectHideFlags: 0
......@@ -15429,6 +15442,7 @@ GameObject:
- component: {fileID: 1067172107}
- component: {fileID: 1067172106}
- component: {fileID: 1067172105}
- component: {fileID: 1067172108}
m_Layer: 0
m_Name: Left Bear Sprite
m_TagString: Untagged
......@@ -15513,6 +15527,17 @@ Transform:
m_Father: {fileID: 528525073}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1067172108
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1067172104}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6fb41bc2c960a474ca178bf920539cf7, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1079370569
GameObject:
m_ObjectHideFlags: 0
......@@ -18637,7 +18662,7 @@ Transform:
- {fileID: 633266567}
- {fileID: 623567581}
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1309499961
GameObject:
......@@ -20908,6 +20933,11 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!4 &1435886715 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4352962975427656, guid: d08e5ea2bee204e49a03bc39be57b580,
type: 2}
m_PrefabInternal: {fileID: 1549015265}
--- !u!1 &1439332550
GameObject:
m_ObjectHideFlags: 0
......@@ -21473,7 +21503,7 @@ Transform:
- {fileID: 1461489672}
- {fileID: 1903791322}
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1469185459
GameObject:
......@@ -22849,7 +22879,7 @@ Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_TransformParent: {fileID: 475534540}
m_Modifications:
- target: {fileID: 4352962975427656, guid: d08e5ea2bee204e49a03bc39be57b580, type: 2}
propertyPath: m_LocalPosition.x
......@@ -22865,15 +22895,15 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 4352962975427656, guid: d08e5ea2bee204e49a03bc39be57b580, type: 2}
propertyPath: m_LocalRotation.x
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4352962975427656, guid: d08e5ea2bee204e49a03bc39be57b580, type: 2}
propertyPath: m_LocalRotation.y
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4352962975427656, guid: d08e5ea2bee204e49a03bc39be57b580, type: 2}
propertyPath: m_LocalRotation.z
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4352962975427656, guid: d08e5ea2bee204e49a03bc39be57b580, type: 2}
propertyPath: m_LocalRotation.w
......@@ -22881,6 +22911,26 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 4352962975427656, guid: d08e5ea2bee204e49a03bc39be57b580, type: 2}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 61457180761495102, guid: d08e5ea2bee204e49a03bc39be57b580,
type: 2}
propertyPath: m_Size.x
value: 0.75
objectReference: {fileID: 0}
- target: {fileID: 61457180761495102, guid: d08e5ea2bee204e49a03bc39be57b580,
type: 2}
propertyPath: m_Size.y
value: 0.2
objectReference: {fileID: 0}
- target: {fileID: 61457180761495102, guid: d08e5ea2bee204e49a03bc39be57b580,
type: 2}
propertyPath: m_Offset.x
value: -0.23
objectReference: {fileID: 0}
- target: {fileID: 61457180761495102, guid: d08e5ea2bee204e49a03bc39be57b580,
type: 2}
propertyPath: m_AutoTiling
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
......
......@@ -13,7 +13,7 @@ AnimatorController:
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
......
......@@ -20,6 +20,8 @@ AnimationClip:
- curve:
- time: 0
value: {fileID: 21300004, guid: b6cedf498df144441baa61816fd0ff7f, type: 3}
- time: 0.083333336
value: {fileID: 21300004, guid: b6cedf498df144441baa61816fd0ff7f, type: 3}
attribute: m_Sprite
path:
classID: 212
......@@ -40,12 +42,13 @@ AnimationClip:
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: 21300004, guid: b6cedf498df144441baa61816fd0ff7f, type: 3}
- {fileID: 21300004, guid: b6cedf498df144441baa61816fd0ff7f, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.083333336
m_StopTime: 0.16666667
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
......
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