Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file not shown.

Large diffs are not rendered by default.

@@ -1989,7 +1989,7 @@ AudioSource:
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_RotationOrder: 0
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
@@ -2068,6 +2068,7 @@ MonoBehaviour:
sword: {fileID: 1946145975115172}
swordAir: {fileID: 1199531797247624}
crouching: 0
Inventory: []
rb: {fileID: 0}
controlUse: Use_P1
controlInteract: Interact_P1
@@ -2104,7 +2105,10 @@ MonoBehaviour:
jump: {fileID: 8300000, guid: 9b4f99dc2c7bf9644abf5f25e216e42f, type: 3}
interact: {fileID: 8300000, guid: 72679e6fac437ea4680d926839a00acc, type: 3}
throwObject: {fileID: 8300000, guid: ad46596d8b4a0c542a75a4e421a9a80a, type: 3}
hurt: {fileID: 8300000, guid: b7f822291fc4f0e4c9327d586bb449e9, type: 3}
hurt:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
pickup: {fileID: 8300000, guid: 238625bf28ec69240b5eddadaf8a4640, type: 3}
volume: 0.5
--- !u!114 &114852379993146206

Large diffs are not rendered by default.

@@ -195,7 +195,7 @@ Transform:
m_LocalScale: {x: 3, y: 5, z: 60}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 8
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &188041130
GameObject:
@@ -279,7 +279,7 @@ Transform:
m_LocalScale: {x: 60, y: 5, z: 3}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &292863701
GameObject:
@@ -344,7 +344,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &347176295
GameObject:
@@ -430,76 +430,31 @@ Transform:
m_LocalScale: {x: 6, y: 1, z: 6}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &819831622 stripped
--- !u!1 &551665636 stripped
GameObject:
m_PrefabParentObject: {fileID: 1185690114351618, guid: 60299f10dbc750a47b64030ab8a135fc,
type: 2}
m_PrefabInternal: {fileID: 1218717292}
--- !u!4 &819831631 stripped
Transform:
m_PrefabParentObject: {fileID: 4899946080685040, guid: 60299f10dbc750a47b64030ab8a135fc,
m_PrefabInternal: {fileID: 1094192065}
--- !u!114 &551665637 stripped
MonoBehaviour:
m_PrefabParentObject: {fileID: 114683390164483186, guid: 60299f10dbc750a47b64030ab8a135fc,
type: 2}
m_PrefabInternal: {fileID: 1218717292}
--- !u!1001 &1075275400
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4153108171750452, guid: 0821e8e087419104db530442084ac1ce, type: 2}
propertyPath: m_LocalPosition.x
value: -11.8
objectReference: {fileID: 0}
- target: {fileID: 4153108171750452, guid: 0821e8e087419104db530442084ac1ce, type: 2}
propertyPath: m_LocalPosition.y
value: 0.01
objectReference: {fileID: 0}
- target: {fileID: 4153108171750452, guid: 0821e8e087419104db530442084ac1ce, type: 2}
propertyPath: m_LocalPosition.z
value: -0.7
objectReference: {fileID: 0}
- target: {fileID: 4153108171750452, guid: 0821e8e087419104db530442084ac1ce, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4153108171750452, guid: 0821e8e087419104db530442084ac1ce, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4153108171750452, guid: 0821e8e087419104db530442084ac1ce, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4153108171750452, guid: 0821e8e087419104db530442084ac1ce, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4153108171750452, guid: 0821e8e087419104db530442084ac1ce, type: 2}
propertyPath: m_RootOrder
value: 9
objectReference: {fileID: 0}
- target: {fileID: 114280876835184546, guid: 0821e8e087419104db530442084ac1ce,
type: 2}
propertyPath: targets.Array.data[0]
value:
objectReference: {fileID: 1451533303}
- target: {fileID: 114280876835184546, guid: 0821e8e087419104db530442084ac1ce,
type: 2}
propertyPath: targets.Array.data[1]
value:
objectReference: {fileID: 819831631}
- target: {fileID: 95696942455333876, guid: 0821e8e087419104db530442084ac1ce,
type: 2}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 0821e8e087419104db530442084ac1ce, type: 2}
m_IsPrefabParent: 0
--- !u!1001 &1218717292
m_PrefabInternal: {fileID: 1094192065}
m_Script: {fileID: 11500000, guid: 84c7818f25a64af4ab4a9947caa61f36, type: 3}
--- !u!1 &562552117 stripped
GameObject:
m_PrefabParentObject: {fileID: 1074509259186322, guid: d8ed5dfdf29553744a9f5617f089e9b3,
type: 2}
m_PrefabInternal: {fileID: 2000514350}
--- !u!114 &562552120 stripped
MonoBehaviour:
m_PrefabParentObject: {fileID: 114196107641465434, guid: d8ed5dfdf29553744a9f5617f089e9b3,
type: 2}
m_PrefabInternal: {fileID: 2000514350}
m_Script: {fileID: 11500000, guid: 84c7818f25a64af4ab4a9947caa61f36, type: 3}
--- !u!1001 &1094192065
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
@@ -508,134 +463,90 @@ Prefab:
m_Modifications:
- target: {fileID: 4899946080685040, guid: 60299f10dbc750a47b64030ab8a135fc, type: 2}
propertyPath: m_LocalPosition.x
value: 2.5
value: 0.76499987
objectReference: {fileID: 0}
- target: {fileID: 4899946080685040, guid: 60299f10dbc750a47b64030ab8a135fc, type: 2}
propertyPath: m_LocalPosition.y
value: 0
value: 1.7919999
objectReference: {fileID: 0}
- target: {fileID: 4899946080685040, guid: 60299f10dbc750a47b64030ab8a135fc, type: 2}
propertyPath: m_LocalPosition.z
value: 0
value: -4.7165003
objectReference: {fileID: 0}
- target: {fileID: 4899946080685040, guid: 60299f10dbc750a47b64030ab8a135fc, type: 2}
propertyPath: m_LocalRotation.x
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4899946080685040, guid: 60299f10dbc750a47b64030ab8a135fc, type: 2}
propertyPath: m_LocalRotation.y
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4899946080685040, guid: 60299f10dbc750a47b64030ab8a135fc, type: 2}
propertyPath: m_LocalRotation.z
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4899946080685040, guid: 60299f10dbc750a47b64030ab8a135fc, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4899946080685040, guid: 60299f10dbc750a47b64030ab8a135fc, type: 2}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 82889563803894480, guid: 60299f10dbc750a47b64030ab8a135fc,
type: 2}
propertyPath: panLevelCustomCurve.m_RotationOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 82889563803894480, guid: 60299f10dbc750a47b64030ab8a135fc,
type: 2}
propertyPath: spreadCustomCurve.m_RotationOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 82889563803894480, guid: 60299f10dbc750a47b64030ab8a135fc,
type: 2}
propertyPath: reverbZoneMixCustomCurve.m_RotationOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114569877321201554, guid: 60299f10dbc750a47b64030ab8a135fc,
type: 2}
propertyPath: controlCrouch
value: Crouch_Keyboard_P2
objectReference: {fileID: 0}
- target: {fileID: 114683390164483186, guid: 60299f10dbc750a47b64030ab8a135fc,
type: 2}
propertyPath: controlHorizontal
value: Horizontal_Keyboard_P2
objectReference: {fileID: 0}
- target: {fileID: 114683390164483186, guid: 60299f10dbc750a47b64030ab8a135fc,
type: 2}
propertyPath: controlVertical
value: Vertical_Keyboard_P2
value: 8
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 60299f10dbc750a47b64030ab8a135fc, type: 2}
m_IsPrefabParent: 0
--- !u!1 &1451533294 stripped
GameObject:
m_PrefabParentObject: {fileID: 1074509259186322, guid: d8ed5dfdf29553744a9f5617f089e9b3,
type: 2}
m_PrefabInternal: {fileID: 1630601571}
--- !u!4 &1451533303 stripped
Transform:
m_PrefabParentObject: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3,
type: 2}
m_PrefabInternal: {fileID: 1630601571}
--- !u!1001 &1630601571
--- !u!1001 &1118241216
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
- target: {fileID: 4721363027493272, guid: 75e02e60502e19c4cbf505a0cd8842b1, type: 2}
propertyPath: m_LocalPosition.x
value: 0
value: -7.3419404
objectReference: {fileID: 0}
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
- target: {fileID: 4721363027493272, guid: 75e02e60502e19c4cbf505a0cd8842b1, type: 2}
propertyPath: m_LocalPosition.y
value: 0
value: 3.43
objectReference: {fileID: 0}
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
- target: {fileID: 4721363027493272, guid: 75e02e60502e19c4cbf505a0cd8842b1, type: 2}
propertyPath: m_LocalPosition.z
value: 0
value: -2.65
objectReference: {fileID: 0}
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
- target: {fileID: 4721363027493272, guid: 75e02e60502e19c4cbf505a0cd8842b1, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
- target: {fileID: 4721363027493272, guid: 75e02e60502e19c4cbf505a0cd8842b1, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
- target: {fileID: 4721363027493272, guid: 75e02e60502e19c4cbf505a0cd8842b1, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
- target: {fileID: 4721363027493272, guid: 75e02e60502e19c4cbf505a0cd8842b1, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
- target: {fileID: 4721363027493272, guid: 75e02e60502e19c4cbf505a0cd8842b1, type: 2}
propertyPath: m_RootOrder
value: 1
value: 9
objectReference: {fileID: 0}
- target: {fileID: 82735868935927016, guid: d8ed5dfdf29553744a9f5617f089e9b3,
- target: {fileID: 114255611070052254, guid: 75e02e60502e19c4cbf505a0cd8842b1,
type: 2}
propertyPath: spreadCustomCurve.m_RotationOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114863984910664236, guid: d8ed5dfdf29553744a9f5617f089e9b3,
propertyPath: targetsToKill.Array.data[0]
value:
objectReference: {fileID: 562552120}
- target: {fileID: 114255611070052254, guid: 75e02e60502e19c4cbf505a0cd8842b1,
type: 2}
propertyPath: m_JumpPower
value: 12
objectReference: {fileID: 0}
- target: {fileID: 1074509259186322, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
propertyPath: targetsToKill.Array.data[1]
value:
objectReference: {fileID: 551665637}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
m_ParentPrefab: {fileID: 100100000, guid: 75e02e60502e19c4cbf505a0cd8842b1, type: 2}
m_IsPrefabParent: 0
--- !u!1 &1640613376
GameObject:
@@ -719,7 +630,7 @@ Transform:
m_LocalScale: {x: 60, y: 5, z: 3}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1821194677
GameObject:
@@ -803,7 +714,7 @@ Transform:
m_LocalScale: {x: 3, y: 5, z: 60}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1822475994
Prefab:
@@ -846,18 +757,87 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 1521916109383756, guid: cb4f6082d86b5564b8750538e86878fd, type: 2}
propertyPath: m_Name
value: Main Camera (1)
value: Main Camera
objectReference: {fileID: 0}
- target: {fileID: 114479840917478578, guid: cb4f6082d86b5564b8750538e86878fd,
type: 2}
propertyPath: t1
value:
objectReference: {fileID: 819831622}
objectReference: {fileID: 562552117}
- target: {fileID: 114479840917478578, guid: cb4f6082d86b5564b8750538e86878fd,
type: 2}
propertyPath: t2
value:
objectReference: {fileID: 1451533294}
objectReference: {fileID: 551665636}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: cb4f6082d86b5564b8750538e86878fd, type: 2}
m_IsPrefabParent: 0
--- !u!1001 &2000514350
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
propertyPath: m_LocalPosition.x
value: 1.8249999
objectReference: {fileID: 0}
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
propertyPath: m_LocalPosition.y
value: 1.8019999
objectReference: {fileID: 0}
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
propertyPath: m_LocalPosition.z
value: -4.7314997
objectReference: {fileID: 0}
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
propertyPath: m_RootOrder
value: 7
objectReference: {fileID: 0}
- target: {fileID: 114336407053764688, guid: d8ed5dfdf29553744a9f5617f089e9b3,
type: 2}
propertyPath: controlCrouch
value: Crouch_Keyboard_P1
objectReference: {fileID: 0}
- target: {fileID: 114196107641465434, guid: d8ed5dfdf29553744a9f5617f089e9b3,
type: 2}
propertyPath: controlHorizontal
value: Horizontal_Keyboard_P1
objectReference: {fileID: 0}
- target: {fileID: 114196107641465434, guid: d8ed5dfdf29553744a9f5617f089e9b3,
type: 2}
propertyPath: controlVertical
value: Vertical_Keyboard_P1
objectReference: {fileID: 0}
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
propertyPath: m_LocalScale.x
value: 0.75
objectReference: {fileID: 0}
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
propertyPath: m_LocalScale.y
value: 0.75
objectReference: {fileID: 0}
- target: {fileID: 4793333755683016, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
propertyPath: m_LocalScale.z
value: 0.75
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: d8ed5dfdf29553744a9f5617f089e9b3, type: 2}
m_IsPrefabParent: 0
@@ -0,0 +1,29 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ButtColliderScript : MonoBehaviour {


[SerializeField] GameObject BadDude;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {

}

void OnTriggerEnter(Collider other)
{
if(other.GetComponent<Rigidbody>().velocity.y < 0 && other.transform.position.y > transform.position.y + 2 && (other.name == "Player_1" || other.name == "Player_2"))
{
BadDude.SendMessage("hurt", 100);
gameObject.SetActive(false);

}
}
}
@@ -0,0 +1,172 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SpinningEnemy : MonoBehaviour {

public UnityEngine.AI.NavMeshAgent agent { get; private set; } // the navmesh agent required for the path finding
public Character character { get; private set; } // the character we are controlling
private Transform target; // target to aim for
public UserControl[] targetsToKill;
public GameObject sword;
public GameObject explosion;
public float health = 100;
public SpawnDamageText damageSpawner;
public bool dead = false;
public float attackTimer;
private Animator m_Animator;
private Rigidbody rb;
private SpinningSoundController sound;
private float battleDistance = 1.5f;
private float attackCooldown = 2.5f;
private float check = 0;
private bool boolCheck = false;


private void Start()
{
// get the components on the object we need ( should not be null due to require component so no need to check )
rb = gameObject.GetComponent<Rigidbody>();
agent = GetComponentInChildren<UnityEngine.AI.NavMeshAgent>();
character = GetComponent<Character>();
agent.stoppingDistance = 1f;
agent.updateRotation = false;
agent.updatePosition = true;
sound = GetComponent<SpinningSoundController>();
m_Animator = GetComponent<Animator>();
findClosest();
m_Animator.SetBool("Spinning", true);
sound.playHellicopter();
}

public void findClosest()
{
float oldDistance = 10f;
foreach (UserControl player in targetsToKill)
{
float newDistance = Vector3.Distance(player.transform.position, transform.position);
if (newDistance < oldDistance && !player.dead)
{
oldDistance = newDistance;
target = player.transform;
}
}
}

private void Update()
{
if (!dead)
{
check += Time.deltaTime;
if (check + 0.3 >= sound.getHeliLength())
{
sound.playHellicopter();
check = 0;
}
if (target != null)
{
agent.SetDestination(target.position);
if (attackTimer <= 0)
{
if (agent.remainingDistance > agent.stoppingDistance)
{
if (agent.remainingDistance < battleDistance)
{
character.Move(agent.desiredVelocity / 3, false, false);
}
else
{
character.Move(agent.desiredVelocity, false, false);
}
}
else if (agent.remainingDistance < agent.stoppingDistance)
{
doAttack();
}
}
else if (attackTimer > 0)
{
if (attackTimer < 1)
findClosest();
attackTimer -= Time.deltaTime;
}
}
else if (target == null)
{
findClosest();
}
}
else if(!boolCheck)
{
boolCheck = true;
m_Animator.SetBool("AttackingGrounded", false);
agent.enabled = false;
m_Animator.enabled = false;
tag = "Throwable";
StartCoroutine("MyCoroutine");
}
}

IEnumerator MyCoroutine()
{
rb.position.Set(rb.position.x, 1, rb.position.z);
rb.velocity = new Vector3(0, 0, 0);
// suspend execution for 5 seconds
yield return new WaitForSeconds(1);
hurt(5);
yield return new WaitForSeconds(1);
hurt(4);
yield return new WaitForSeconds(1);
hurt(3);
yield return new WaitForSeconds(1);
hurt(2);
yield return new WaitForSeconds(1);
hurt(1);
yield return new WaitForSeconds(1);
Instantiate(explosion, new Vector3(transform.position.x, 1, transform.position.z), Quaternion.identity);
Destroy(gameObject);
}

private void hurt(float damage)
{
health -= damage;
damageSpawner.spawnText(damage.ToString());
if (health <= 0)
{
m_Animator.SetBool("Spinning", false);
m_Animator.SetBool("Death", true);
dead = true;
}
}

public void doAttack()
{
character.Move(Vector3.zero, false, false);
agent.velocity = Vector3.zero;
var lookPos = target.transform.position - transform.position;
lookPos.y = 0;
transform.rotation = Quaternion.LookRotation(lookPos);
//m_Animator.SetBool("AttackingGrounded", true);
attackTimer = attackCooldown;
}

public void enableCollision()
{
sword.SendMessage("turnOnCollider");
}

public void disableCollision()
{
sword.SendMessage("turnOffCollider");
}

public void stopAttack()
{
m_Animator.SetBool("AttackingGrounded", false);
}

public void SetTarget(Transform target)
{
this.target = target;
}
}
@@ -0,0 +1,25 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SpinningSoundController : MonoBehaviour {

public AudioClip hellicopter;
public float volume;
private AudioSource source;

void Start () {
source = GetComponent<AudioSource>();
source.pitch = (float)1.25;
}

public void playHellicopter()
{
source.PlayOneShot(hellicopter, volume);
}

public float getHeliLength()
{
return hellicopter.length;
}
}
@@ -126,8 +126,8 @@ void UpdateAnimator(Vector3 move)
// update the animator parameters
m_Animator.SetFloat("Forward", m_ForwardAmount, 0.1f, Time.deltaTime);
m_Animator.SetFloat("Turn", m_TurnAmount, 0.1f, Time.deltaTime);
m_Animator.SetBool("Crouch", m_Crouching);
m_Animator.SetBool("OnGround", m_IsGrounded);
//m_Animator.SetBool("Crouch", m_Crouching);
//m_Animator.SetBool("OnGround", m_IsGrounded);
if (!m_IsGrounded)
{
m_Animator.SetFloat("Jump", m_Rigidbody.velocity.y);
@@ -142,7 +142,7 @@ void UpdateAnimator(Vector3 move)
float jumpLeg = (runCycle < k_Half ? 1 : -1) * m_ForwardAmount;
if (m_IsGrounded)
{
m_Animator.SetFloat("JumpLeg", jumpLeg);
//m_Animator.SetFloat("JumpLeg", jumpLeg);
}

// the anim speed multiplier allows the overall speed of walking/running to be tweaked in the inspector,
Binary file not shown.