Commit 5db7d444 authored by Markus Schlösser's avatar Markus Schlösser

Updated cannon and fixed challenger collision

parent 9851e683
fileFormatVersion: 2
guid: d7664b9dd09e4b649a453dd2659b2bcf
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -19,62 +19,56 @@ AnimationClip:
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: 21300000, guid: 14cd72156ec4da5408968db87210c7e9, type: 3}
- time: 0.041666668
value: {fileID: 21300000, guid: 21f5a4f0422aaca43ab857110a14ad02, type: 3}
- time: 0.083333336
value: {fileID: 21300000, guid: 9ebc326e7bd094b4c8a562ee03fb7fd8, type: 3}
- time: 0.125
value: {fileID: 21300000, guid: 323f8162cf7bf75488d6ebb320c068f2, type: 3}
- time: 0.16666667
- time: 0.045454547
value: {fileID: 21300000, guid: 6fa6c6f051e157642aa21e3b4610995d, type: 3}
- time: 0.20833333
- time: 0.09090909
value: {fileID: 21300000, guid: f130a0814c0cc054099afafc53bf9b42, type: 3}
- time: 0.25
- time: 0.13636364
value: {fileID: 21300000, guid: 3dcc78263d25e5040ad93396c7e1950d, type: 3}
- time: 0.29166666
- time: 0.18181819
value: {fileID: 21300000, guid: ca13749ff5e45f449b6869aca58c6687, type: 3}
- time: 0.33333334
- time: 0.22727273
value: {fileID: 21300000, guid: 5993f3ea65cfc8e429047aa1897fb78e, type: 3}
- time: 0.375
- time: 0.27272728
value: {fileID: 21300000, guid: bd87c6cc4178cfc4aa92d3b519d386ed, type: 3}
- time: 0.41666666
- time: 0.3181818
value: {fileID: 21300000, guid: bcd70210a8507ac409230d5b3d5c95b9, type: 3}
- time: 0.45833334
- time: 0.36363637
value: {fileID: 21300000, guid: 266af654601b5ee4c92141e7b8ddcd89, type: 3}
- time: 0.5
- time: 0.4090909
value: {fileID: 21300000, guid: df82b58ec17829f4d99ae927617e7452, type: 3}
- time: 0.5416667
- time: 0.45454547
value: {fileID: 21300000, guid: 15368947b307ea749beb6ff19949ec86, type: 3}
- time: 0.5833333
- time: 0.5
value: {fileID: 21300000, guid: 0171f4ca415f40d40ac4b51d13e34a5c, type: 3}
- time: 0.625
- time: 0.54545456
value: {fileID: 21300000, guid: 46304b4404591334693fd2381a88ab27, type: 3}
- time: 0.6666667
- time: 0.59090906
value: {fileID: 21300000, guid: db98f01ebe7e66f4d81a1353759fef2b, type: 3}
- time: 0.7083333
- time: 0.6363636
value: {fileID: 21300000, guid: 8fb9796a1ac9b2443a6acf71518e1c0b, type: 3}
- time: 0.75
- time: 0.6818182
value: {fileID: 21300000, guid: 02d768e4e907d704c8fa5e40c374c5e9, type: 3}
- time: 0.7916667
- time: 0.72727275
value: {fileID: 21300000, guid: 4194e5ba24c4eab4eac3a0edb2a78025, type: 3}
- time: 0.8333333
- time: 0.77272725
value: {fileID: 21300000, guid: d267ae42556ea424c90b4b639460903d, type: 3}
- time: 0.875
- time: 0.8181818
value: {fileID: 21300000, guid: 8ad512fef4ebd394e874dd8c46f649b1, type: 3}
- time: 0.9166667
- time: 0.8636364
value: {fileID: 21300000, guid: 077aec075277b17428831a3ae07bcd2d, type: 3}
- time: 0.9583333
- time: 0.90909094
value: {fileID: 21300000, guid: da261ea7119fecd42a9c183710f87287, type: 3}
- time: 1
- time: 0.95454544
value: {fileID: 21300000, guid: b54c01cd20cdddf459d4057e290e80bf, type: 3}
- time: 1.0416666
- time: 1
value: {fileID: 21300000, guid: 35df263875e0411498b3f1d73f1f932a, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 24
m_SampleRate: 22
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
......@@ -89,9 +83,6 @@ AnimationClip:
customType: 23
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: 21300000, guid: 14cd72156ec4da5408968db87210c7e9, type: 3}
- {fileID: 21300000, guid: 21f5a4f0422aaca43ab857110a14ad02, type: 3}
- {fileID: 21300000, guid: 9ebc326e7bd094b4c8a562ee03fb7fd8, type: 3}
- {fileID: 21300000, guid: 323f8162cf7bf75488d6ebb320c068f2, type: 3}
- {fileID: 21300000, guid: 6fa6c6f051e157642aa21e3b4610995d, type: 3}
- {fileID: 21300000, guid: f130a0814c0cc054099afafc53bf9b42, type: 3}
......@@ -120,7 +111,7 @@ AnimationClip:
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1.0833333
m_StopTime: 1.0454545
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
......@@ -140,11 +131,4 @@ AnimationClip:
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events:
- time: 0.125
functionName: Fire
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0
m_Events: []
......@@ -75,7 +75,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!1 &1797984525371050
GameObject:
m_ObjectHideFlags: 0
......@@ -92,7 +92,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &4060432582790156
Transform:
m_ObjectHideFlags: 1
......@@ -114,7 +114,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1320188170728490}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 10.559809, y: 7.586144, z: 0}
m_LocalPosition: {x: 12.65, y: 5.55, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_Children:
- {fileID: 4515523674784162}
......@@ -229,12 +229,11 @@ MonoBehaviour:
m_EditorClassIdentifier:
cannonBarrel: {fileID: 1263581091867116}
fire: {fileID: 1087194835788670, guid: 3fd0675fac3d4794aafbb72c8557c635, type: 2}
shotsPerSeconds: 0.5
fireDelay: 1
speed: 7
anim: {fileID: 95144805117775786}
animRadVorne: {fileID: 95645392377643954}
animRadHinten: {fileID: 95763621902185322}
startAfterTime: 0
--- !u!212 &212085445371616958
SpriteRenderer:
m_ObjectHideFlags: 1
......
......@@ -152,7 +152,7 @@ Rigidbody2D:
m_GravityScale: 1
m_Material: {fileID: 0}
m_Interpolate: 0
m_SleepingMode: 1
m_SleepingMode: 0
m_CollisionDetection: 1
m_Constraints: 0
--- !u!61 &61539110044657252
......
......@@ -9,12 +9,24 @@ public class CannonController : MonoBehaviour, IResetable {
[SerializeField] private Animator animRadVorne;
[SerializeField] private Animator animRadHinten;
private void Start()
{
InvokeRepeating("FireCannon", 0.0f, fireDelay);
private Coroutine co;
private float time;
private void Start() {
ResetToLevelBegin();
}
public void FireCannon() {
private void FixedUpdate() {
if (time >= fireDelay) {
time -= fireDelay;
Fire();
}
time += Time.deltaTime;
}
private void Fire() {
anim.SetTrigger("Fire");
GameObject obj = Instantiate(fire, cannonBarrel.transform.Find("FirePoint").position, cannonBarrel.transform.rotation);
......@@ -26,6 +38,6 @@ public class CannonController : MonoBehaviour, IResetable {
}
public void ResetToLevelBegin() {
time = fireDelay;
}
}
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