Commit 2ca8f563 authored by Jan Meissner's avatar Jan Meissner
Browse files

Build settings fixed, fireball added

parent 181fd1f8
Pipeline #2929 waiting for manual action with stages
in 11 minutes and 16 seconds
fileFormatVersion: 2
guid: e0a9389e40e4b0c49a1bfa419d37dbdb
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Fireball
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 1107118418710014514}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &1102134066786047242
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Flying
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: aa7373c0bbcc7854a8b17d0ecb73a165, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &1107118418710014514
AnimatorStateMachine:
serializedVersion: 5
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 1102134066786047242}
m_Position: {x: 288, y: 120, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 1102134066786047242}
fileFormatVersion: 2
guid: c785367e65b3cc447adf7fe1dc713f84
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Flying
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: 21300000, guid: b0044b39f7fd9b144a7bfd4c533a1759, type: 3}
- time: 0.125
value: {fileID: 21300000, guid: a67fec926a034ca45a6a7229c3c03292, type: 3}
- time: 0.25
value: {fileID: 21300000, guid: 5ab744c702a09bb4ba9f40a8fe989d70, type: 3}
- time: 0.375
value: {fileID: 21300000, guid: 5a57ee5c008aaaa4db7f129de1ae98eb, type: 3}
- time: 0.5
value: {fileID: 21300000, guid: 072e948b2c782df45b1124e4c1437b38, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 8
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 0
attribute: 0
script: {fileID: 0}
typeID: 212
customType: 23
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: 21300000, guid: b0044b39f7fd9b144a7bfd4c533a1759, type: 3}
- {fileID: 21300000, guid: a67fec926a034ca45a6a7229c3c03292, type: 3}
- {fileID: 21300000, guid: 5ab744c702a09bb4ba9f40a8fe989d70, type: 3}
- {fileID: 21300000, guid: 5a57ee5c008aaaa4db7f129de1ae98eb, type: 3}
- {fileID: 21300000, guid: 072e948b2c782df45b1124e4c1437b38, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.625
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves: []
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []
fileFormatVersion: 2
guid: aa7373c0bbcc7854a8b17d0ecb73a165
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:
......@@ -12,13 +12,14 @@ GameObject:
- component: {fileID: 8475344232927896200}
- component: {fileID: 8475344232927896203}
- component: {fileID: 8475344232927896206}
- component: {fileID: 7422894268804306870}
m_Layer: 13
m_Name: Fireball
m_TagString: Fire
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!4 &8475344232927896201
Transform:
m_ObjectHideFlags: 0
......@@ -28,7 +29,7 @@ Transform:
m_GameObject: {fileID: 8475344232927896202}
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
m_LocalPosition: {x: -3, y: 0.52, z: -0.07555954}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 0.5, y: 0.5, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
......@@ -70,7 +71,7 @@ SpriteRenderer:
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 3b82b26f0b16f8e48ae67381e4fbcfb2, type: 3}
m_Sprite: {fileID: 21300000, guid: b0044b39f7fd9b144a7bfd4c533a1759, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
......@@ -96,7 +97,7 @@ Rigidbody2D:
m_Mass: 1
m_LinearDrag: 0
m_AngularDrag: 0.05
m_GravityScale: 1
m_GravityScale: 0
m_Material: {fileID: 0}
m_Interpolate: 0
m_SleepingMode: 1
......@@ -112,10 +113,10 @@ BoxCollider2D:
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0.020964146, y: 0.06885064}
m_Offset: {x: 0, y: 0.05164188}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
......@@ -126,5 +127,24 @@ BoxCollider2D:
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 0.70650244, y: 0.46715522}
m_Size: {x: 1, y: 0.86079156}
m_EdgeRadius: 0
--- !u!95 &7422894268804306870
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8475344232927896202}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: c785367e65b3cc447adf7fe1dc713f84, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
......@@ -5,17 +5,17 @@ using UnityEngine.EventSystems;
public class Abilities : MonoBehaviour
{
[SerializeField] float fireSpeed = 10.0f;
[SerializeField] float fireSpeed = 3.0f;
[SerializeField] float bombSpeed = 0.5f;
[SerializeField] private float cooldown = 3f;
private Transform playerTransform;
private SpriteRenderer playerSpriteRenderer;
[SerializeField] private float cooldownTimer;
private void Awake()
{
// Debug Code
playerTransform = transform;
playerSpriteRenderer = GetComponent<SpriteRenderer>();
cooldownTimer = cooldown;
}
......@@ -37,11 +37,20 @@ public class Abilities : MonoBehaviour
GameObject firePrefab = Resources.Load<GameObject>("Fireball");
GameObject fireObject = Instantiate(firePrefab);
SpriteRenderer fireRenderer = fireObject.GetComponent<SpriteRenderer>();
fireObject.transform.position = playerTransform.position;
//fireObject.transform.rotation = playerTransform.rotation;
fireObject.transform.position = transform.position;
fireRenderer.flipX = playerSpriteRenderer.flipX;
fireObject.GetComponent<Rigidbody2D>().velocity = new Vector2(fireSpeed, 0f);
int flipDir = 1;
if (!fireRenderer.flipX)
{
flipDir = -1;
}
fireObject.GetComponent<Rigidbody2D>().velocity = new Vector2(fireSpeed * flipDir, 0f);
cooldownTimer = cooldown;
}
public void Bomb()
......@@ -54,9 +63,11 @@ public class Abilities : MonoBehaviour
GameObject bombPrefab = Resources.Load<GameObject>("Bomb");
GameObject bombObject = Instantiate(bombPrefab);
bombObject.transform.position = playerTransform.position;
bombObject.transform.position = transform.position;
//bombObject.transform.rotation = playerTransform.rotation;
bombObject.GetComponent<Rigidbody2D>().velocity = new Vector2(fireSpeed, 0f);
cooldownTimer = cooldown;
}
}
......@@ -13,12 +13,12 @@ public class DebugInput : MonoBehaviour
private void FixedUpdate()
{
if (Input.GetKey(KeyCode.A))
if (Input.GetKey(KeyCode.Y))
{
abilities.Fire();
}
if (Input.GetKey(KeyCode.S))
if (Input.GetKey(KeyCode.X))
{
abilities.Bomb();
}
......
......@@ -20,10 +20,4 @@ EditorBuildSettings:
- enabled: 1
path: Assets/_Game/Scenes/Level 4.unity
guid: 4a724156e48b4f3449d1f03aec65dcf8
- enabled: 1
path: Assets/_Game/Scenes/OptionScene.unity
guid: ec3d5740bb274444595fc2cc83d31799
- enabled: 1
path: Assets/_Game/Scenes/CreditScene.unity
guid: 59db9b8091e198d47964cc1feb902269
m_configObjects: {}
Supports Markdown
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