Skip to content
Snippets Groups Projects
Commit eeb5d71f authored by Gard Aleksander Furre's avatar Gard Aleksander Furre
Browse files

change of sprite on slime

parent 71812208
No related branches found
No related tags found
2 merge requests!83Gardaf,!82change of sprite on slime
......@@ -47,25 +47,25 @@ namespace BigSock {
/*
Minimum time the slime should idle before it can charge.
*/
protected static readonly TimeSpan IDLE_WAIT_TIME = new TimeSpan(0, 0, 0, 1, 0);
protected static readonly TimeSpan IDLE_WAIT_TIME = new TimeSpan(0, 0, 0, 0, 5);
/*
Minimum time the slime should charge before it can leap.
*/
protected static readonly TimeSpan CHARGE_WAIT_TIME = new TimeSpan(0, 0, 0, 2, 0);
protected static readonly TimeSpan CHARGE_WAIT_TIME = new TimeSpan(0, 0, 0, 1, 0);
/*
Maximum time the slime should leap before it can idle.
*/
protected static readonly TimeSpan LEAP_WAIT_TIME = new TimeSpan(0, 0, 0, 4, 0);
protected static readonly TimeSpan LEAP_WAIT_TIME = new TimeSpan(0, 0, 0, 2, 0);
/*
The force the slime leaps at.
*/
public double LeapForce => MovementSpeed * 4;
public double LeapForce => MovementSpeed * 10;
//void Start() {
// rb = GetComponent<Rigidbody2D>();
// m_Animator = gameObject.GetComponent<Animator>();
// m_Animator = gameObject.GetComponent<Animator>();
// followCollider = transform.Find("followCollider").GetComponent<EmptyCollider>();
// followCollider.OnColliderEnter2D_Action += Move_OnColliderEnter2D;
// followCollider.OnColliderStay2D_Action += Move_OnColliderStay2D;
......@@ -90,7 +90,7 @@ namespace BigSock {
// Update the state.
State = SlimeState.Charging;
NextTimeStateCanChange = DateTime.Now + CHARGE_WAIT_TIME;
m_Animator.SetTrigger("walk");
m_Animator.SetTrigger("idle");
}
}
......@@ -117,7 +117,7 @@ namespace BigSock {
// Update the state.
State = SlimeState.Idle;
NextTimeStateCanChange = DateTime.Now + IDLE_WAIT_TIME;
m_Animator.SetTrigger("idle");
m_Animator.SetTrigger("walk");
}
}
......
......@@ -79,7 +79,7 @@ SpriteRenderer:
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 2
m_Sprite: {fileID: 21300000, guid: dfb75b4c193e2994dabfcb50c3cf64e5, type: 3}
m_Sprite: {fileID: 1784894595, guid: 2bbb85d06a94d0d478b4c0707a9805c4, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
......@@ -121,7 +121,7 @@ Animator:
m_GameObject: {fileID: 2996495149472241661}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 87d00f377b8992e4092c2ea820422659, type: 2}
m_Controller: {fileID: 9100000, guid: 311b011bc4e42144abcc058ae333ad8d, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
......@@ -148,7 +148,7 @@ BoxCollider2D:
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 1, y: 1.25}
oldSize: {x: 1, y: 1}
newSize: {x: 0.16, y: 0.2}
adaptiveTilingThreshold: 0.5
drawMode: 0
......@@ -285,7 +285,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8620845285361089561}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.04, y: 0, z: 0}
m_LocalPosition: {x: 0.04, y: -0.171, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
......@@ -307,7 +307,7 @@ CircleCollider2D:
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
serializedVersion: 2
m_Radius: 0.7
m_Radius: 0.4
--- !u!114 &6373942986610437007
MonoBehaviour:
m_ObjectHideFlags: 0
......
%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: jumpingEnemy
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: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings: []
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1
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: a3303a7e171cb20489f9ba90bf0cc149
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment