mirror of
https://github.com/zoriya/Goulag-Prototype.git
synced 2026-06-04 10:44:25 +00:00
MERGE CONFLICT/20
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0b27d6914e0a1494bb43396365f95971
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35cb569e88653d643bee937f46da9c8c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,10 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!62 &6200000
|
||||
PhysicsMaterial2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Player
|
||||
friction: 0
|
||||
bounciness: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 082e03d7d0d0c5640afa7f05f0e6e8ce
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 6200000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -58,8 +58,8 @@ Rigidbody2D:
|
||||
m_Mass: 1
|
||||
m_LinearDrag: 0
|
||||
m_AngularDrag: 0.05
|
||||
m_GravityScale: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_GravityScale: 2
|
||||
m_Material: {fileID: 6200000, guid: 082e03d7d0d0c5640afa7f05f0e6e8ce, type: 2}
|
||||
m_Interpolate: 1
|
||||
m_SleepingMode: 0
|
||||
m_CollisionDetection: 1
|
||||
@@ -138,11 +138,11 @@ MonoBehaviour:
|
||||
UseKey: 0
|
||||
TakeKey: 0
|
||||
setuped: 0
|
||||
sensiX: 10
|
||||
sensiY: 15
|
||||
DownDetector: 1
|
||||
echo_act_3: 10
|
||||
DeathSound: {fileID: 0}
|
||||
sensiX: 30
|
||||
sensiY: 7
|
||||
DownDetector: 0.5
|
||||
layerMask: 512
|
||||
DeathSound: {fileID: 8300000, guid: 01ed6d264e5f771478d48481c06d9d5e, type: 3}
|
||||
--- !u!212 &212465444373585022
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
|
||||
@@ -38,7 +38,7 @@ RenderSettings:
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481694, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
@@ -226,13 +226,101 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!81 &403186794
|
||||
AudioListener:
|
||||
--- !u!82 &403186794
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 403186791}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!114 &403186796
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -244,7 +332,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: f9a880a4af99f7b4ca47a85c5b10b90f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
PlayerPrefab: {fileID: 1400916412662404, guid: e39e9213b04aede49a12e77bc88f11a4,
|
||||
PlayerPrefab: {fileID: 1295779273530774, guid: f5eee23f42e32c740a46ae6b64fb96e1,
|
||||
type: 2}
|
||||
RespawnTime: 5
|
||||
RespawnPosition: {x: -10, y: 6, z: 0}
|
||||
|
||||
@@ -22,7 +22,6 @@ public class PlayerController : MonoBehaviour
|
||||
[SerializeField]
|
||||
float DownDetector = 1;
|
||||
[SerializeField]
|
||||
float echo_act_3 = 10;
|
||||
int layerMask = 1 << 9;
|
||||
private bool IsGrounded = true;
|
||||
RaycastHit2D hit;
|
||||
@@ -47,12 +46,14 @@ public class PlayerController : MonoBehaviour
|
||||
void Update()
|
||||
{
|
||||
ShortInput();
|
||||
|
||||
}
|
||||
#region
|
||||
void OnCollisionStay2D(Collision2D other)
|
||||
{
|
||||
if (other.transform != null && hit.transform != null)
|
||||
{
|
||||
|
||||
if (other.transform.name == hit.transform.name)
|
||||
{
|
||||
IsGrounded = true;
|
||||
@@ -73,31 +74,33 @@ public class PlayerController : MonoBehaviour
|
||||
{
|
||||
//Ici on preprocess les inputs
|
||||
|
||||
|
||||
|
||||
if (Input.GetKeyDown(JumpKey))
|
||||
if (IsGrounded)
|
||||
{
|
||||
vertical = sensiY;
|
||||
if (Input.GetKeyDown(JumpKey))
|
||||
{
|
||||
|
||||
vertical = sensiY;
|
||||
}
|
||||
else
|
||||
{
|
||||
vertical = 0;
|
||||
}
|
||||
}
|
||||
if (Input.GetKeyUp(JumpKey))
|
||||
{
|
||||
rb2.velocity = new Vector2(rb2.velocity.x, 1 / rb2.velocity.y);
|
||||
rb2.velocity = new Vector2(rb2.velocity.x, rb2.velocity.y * 0.2f);
|
||||
}
|
||||
|
||||
hit = Physics2D.Raycast(transform.position, Vector2.down, DownDetector, layerMask);
|
||||
|
||||
Move(horizontal, vertical);
|
||||
|
||||
if (IsGrounded == false)
|
||||
hit = Physics2D.Raycast(transform.position, Vector2.down, DownDetector, layerMask);
|
||||
if(hit.collider == null)
|
||||
{
|
||||
rb2.gravityScale = echo_act_3;
|
||||
vertical = 0;
|
||||
IsGrounded = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
rb2.gravityScale = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Move(horizontal, vertical);
|
||||
}
|
||||
|
||||
private void Move(float horizontal, float vertical)
|
||||
@@ -126,7 +129,7 @@ public class PlayerController : MonoBehaviour
|
||||
rend.flipY = false;
|
||||
}
|
||||
|
||||
rb2.AddForce(new Vector2(horizontal, vertical) * Time.deltaTime, ForceMode2D.Impulse);
|
||||
rb2.AddForce(new Vector2(horizontal * Time.deltaTime, vertical), ForceMode2D.Impulse);
|
||||
}
|
||||
#endregion
|
||||
public void Die()
|
||||
|
||||
Reference in New Issue
Block a user