mirror of
https://github.com/ConjureETS/Labo_2_Equ_1_a15.git
synced 2026-03-24 01:50:58 +00:00
Merge branch 'xavier_develop'
This commit is contained in:
commit
bd062cb2f3
9
Assets/Animations.meta
Normal file
9
Assets/Animations.meta
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0be5178eda42c884b910fd35e0bd7ef1
|
||||||
|
folderAsset: yes
|
||||||
|
timeCreated: 1446671881
|
||||||
|
licenseType: Free
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Animations/Idle.anim
Normal file
BIN
Assets/Animations/Idle.anim
Normal file
Binary file not shown.
8
Assets/Animations/Idle.anim.meta
Normal file
8
Assets/Animations/Idle.anim.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a5953cc6b2350a04aa578af74d1740a3
|
||||||
|
timeCreated: 1446674697
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Animations/Running.anim
Normal file
BIN
Assets/Animations/Running.anim
Normal file
Binary file not shown.
8
Assets/Animations/Running.anim.meta
Normal file
8
Assets/Animations/Running.anim.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 90df11971c9d126429f338c1cfc08ac3
|
||||||
|
timeCreated: 1446674724
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Animations/ShotingWhileRunning.anim
Normal file
BIN
Assets/Animations/ShotingWhileRunning.anim
Normal file
Binary file not shown.
8
Assets/Animations/ShotingWhileRunning.anim.meta
Normal file
8
Assets/Animations/ShotingWhileRunning.anim.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: fa93b95d117b58a43b3a34cc2f860e8b
|
||||||
|
timeCreated: 1446687352
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Animations/megaman.controller
Normal file
BIN
Assets/Animations/megaman.controller
Normal file
Binary file not shown.
8
Assets/Animations/megaman.controller.meta
Normal file
8
Assets/Animations/megaman.controller.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4435a97212c21a447a54fac1ff9a76ed
|
||||||
|
timeCreated: 1446674697
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
39
Assets/Scripts/Animations.cs
Normal file
39
Assets/Scripts/Animations.cs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
public class Animations : MonoBehaviour {
|
||||||
|
|
||||||
|
private Animator anim;
|
||||||
|
private bool isShooting;
|
||||||
|
|
||||||
|
// Use this for initialization
|
||||||
|
void Start () {
|
||||||
|
|
||||||
|
anim = GetComponent<Animator>();
|
||||||
|
isShooting = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update () {
|
||||||
|
|
||||||
|
float mouvementX = Input.GetAxis("Horizontal");
|
||||||
|
|
||||||
|
|
||||||
|
if (Input.GetKeyDown(KeyCode.X))
|
||||||
|
{
|
||||||
|
isShooting = true;
|
||||||
|
} // if
|
||||||
|
|
||||||
|
|
||||||
|
if (Input.GetKeyUp(KeyCode.X))
|
||||||
|
{
|
||||||
|
isShooting = false;
|
||||||
|
} // if
|
||||||
|
|
||||||
|
|
||||||
|
anim.SetFloat("SpeedX", Mathf.Abs(mouvementX));
|
||||||
|
anim.SetBool("isShooting", isShooting);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
12
Assets/Scripts/Animations.cs.meta
Normal file
12
Assets/Scripts/Animations.cs.meta
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 54028f0b56ae6d143b1a877a63b8fef4
|
||||||
|
timeCreated: 1446675026
|
||||||
|
licenseType: Free
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -28,6 +28,7 @@ public class Character{
|
|||||||
public void setTouchingTheFloor(bool touchFloor){
|
public void setTouchingTheFloor(bool touchFloor){
|
||||||
this.touchingTheFloor = touchFloor;
|
this.touchingTheFloor = touchFloor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool isTouchingTheFloor()
|
public bool isTouchingTheFloor()
|
||||||
{
|
{
|
||||||
return touchingTheFloor;
|
return touchingTheFloor;
|
||||||
|
|||||||
@ -17,10 +17,34 @@ public class Control : MonoBehaviour {
|
|||||||
|
|
||||||
float mouvement = Input.GetAxis ("Horizontal");
|
float mouvement = Input.GetAxis ("Horizontal");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
if ( mouvement!= 0)
|
if ( mouvement!= 0)
|
||||||
{
|
{
|
||||||
thingsToMove.Translate(new Vector2(mouvement * speed, 0));
|
thingsToMove.Translate(new Vector2(mouvement * speed, 0));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// aller vers la gauche
|
||||||
|
if (mouvement > 0.0)
|
||||||
|
{
|
||||||
|
thingsToMove.Translate(new Vector2(mouvement * speed, 0));
|
||||||
|
transform.eulerAngles = new Vector2(0, 0);
|
||||||
|
|
||||||
|
} // if
|
||||||
|
|
||||||
|
|
||||||
|
// aller vers la droite
|
||||||
|
if (mouvement < 0.0)
|
||||||
|
{
|
||||||
|
|
||||||
|
thingsToMove.Translate(new Vector2(-(mouvement * speed), 0));
|
||||||
|
transform.eulerAngles = new Vector2(0, 180);
|
||||||
|
|
||||||
|
} // if
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,12 +19,12 @@ public class Jump : MonoBehaviour {
|
|||||||
|
|
||||||
if (Input.GetButton("Fire1") && isJumping == false)
|
if (Input.GetButton("Fire1") && isJumping == false)
|
||||||
{
|
{
|
||||||
timeJump = 50;
|
timeJump = 10;
|
||||||
isJumping = true;
|
isJumping = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timeJump > 0) {
|
if (timeJump > 0) {
|
||||||
player.Translate(0, 0.5f, 0);
|
player.Translate(0, 0.4f, 0);
|
||||||
timeJump--;
|
timeJump--;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
BIN
Assets/Sprites/Shooting.anim
Normal file
BIN
Assets/Sprites/Shooting.anim
Normal file
Binary file not shown.
8
Assets/Sprites/Shooting.anim.meta
Normal file
8
Assets/Sprites/Shooting.anim.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1505078d1784bab4d9fbd9ba3eba4009
|
||||||
|
timeCreated: 1446690168
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Sprites/mm.png
Normal file
BIN
Assets/Sprites/mm.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
214
Assets/Sprites/mm.png.meta
Normal file
214
Assets/Sprites/mm.png.meta
Normal file
@ -0,0 +1,214 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 14370da66867eeb479e470bd4bb068f7
|
||||||
|
timeCreated: 1446690230
|
||||||
|
licenseType: Free
|
||||||
|
TextureImporter:
|
||||||
|
fileIDToRecycleName:
|
||||||
|
21300000: Player
|
||||||
|
21300002: Running0
|
||||||
|
21300004: Running1
|
||||||
|
21300006: Running2
|
||||||
|
21300008: Idle0
|
||||||
|
21300010: Idle1
|
||||||
|
21300012: Jump0
|
||||||
|
21300014: Jump1
|
||||||
|
21300016: Jump2
|
||||||
|
21300018: RunNShot0
|
||||||
|
21300020: RunNShot1
|
||||||
|
21300022: RunNShot2
|
||||||
|
21300024: Jumping0
|
||||||
|
21300026: Jumping1
|
||||||
|
21300028: Jumping2
|
||||||
|
21300030: Jumping3
|
||||||
|
21300032: Jumping4
|
||||||
|
21300034: Shooting
|
||||||
|
serializedVersion: 2
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
linearTexture: 0
|
||||||
|
correctGamma: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: .25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 0
|
||||||
|
cubemapConvolution: 0
|
||||||
|
cubemapConvolutionSteps: 8
|
||||||
|
cubemapConvolutionExponent: 1.5
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: -1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
filterMode: -1
|
||||||
|
aniso: 16
|
||||||
|
mipBias: -1
|
||||||
|
wrapMode: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
rGBM: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
spriteMode: 2
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: .5, y: .5}
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
textureType: 8
|
||||||
|
buildTargetSettings: []
|
||||||
|
spriteSheet:
|
||||||
|
sprites:
|
||||||
|
- name: Player
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 8
|
||||||
|
y: 313
|
||||||
|
width: 21
|
||||||
|
height: 24
|
||||||
|
alignment: 0
|
||||||
|
pivot: {x: .5, y: .5}
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
- name: Running0
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 156
|
||||||
|
y: 313
|
||||||
|
width: 24
|
||||||
|
height: 22
|
||||||
|
alignment: 0
|
||||||
|
pivot: {x: .5, y: .5}
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
- name: Running1
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 209
|
||||||
|
y: 313
|
||||||
|
width: 16
|
||||||
|
height: 24
|
||||||
|
alignment: 0
|
||||||
|
pivot: {x: .5, y: .5}
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
- name: Running2
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 255
|
||||||
|
y: 313
|
||||||
|
width: 21
|
||||||
|
height: 22
|
||||||
|
alignment: 0
|
||||||
|
pivot: {x: .5, y: .5}
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
- name: Idle0
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 58
|
||||||
|
y: 313
|
||||||
|
width: 21
|
||||||
|
height: 24
|
||||||
|
alignment: 0
|
||||||
|
pivot: {x: .5, y: .5}
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
- name: RunNShot0
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 156
|
||||||
|
y: 263
|
||||||
|
width: 29
|
||||||
|
height: 22
|
||||||
|
alignment: 0
|
||||||
|
pivot: {x: .5, y: .5}
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
- name: RunNShot1
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 209
|
||||||
|
y: 263
|
||||||
|
width: 26
|
||||||
|
height: 24
|
||||||
|
alignment: 0
|
||||||
|
pivot: {x: .5, y: .5}
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
- name: RunNShot2
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 255
|
||||||
|
y: 263
|
||||||
|
width: 30
|
||||||
|
height: 22
|
||||||
|
alignment: 0
|
||||||
|
pivot: {x: .5, y: .5}
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
- name: Jumping0
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 261
|
||||||
|
y: 13
|
||||||
|
width: 16
|
||||||
|
height: 24
|
||||||
|
alignment: 0
|
||||||
|
pivot: {x: .5, y: .5}
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
- name: Jumping1
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 313
|
||||||
|
y: 13
|
||||||
|
width: 12
|
||||||
|
height: 24
|
||||||
|
alignment: 0
|
||||||
|
pivot: {x: .5, y: .5}
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
- name: Jumping2
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 361
|
||||||
|
y: 13
|
||||||
|
width: 17
|
||||||
|
height: 24
|
||||||
|
alignment: 0
|
||||||
|
pivot: {x: .5, y: .5}
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
- name: Jumping3
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 408
|
||||||
|
y: 13
|
||||||
|
width: 21
|
||||||
|
height: 24
|
||||||
|
alignment: 0
|
||||||
|
pivot: {x: .5, y: .5}
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
- name: Jumping4
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 458
|
||||||
|
y: 13
|
||||||
|
width: 21
|
||||||
|
height: 24
|
||||||
|
alignment: 0
|
||||||
|
pivot: {x: .5, y: .5}
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
- name: Shooting
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 108
|
||||||
|
y: 263
|
||||||
|
width: 31
|
||||||
|
height: 24
|
||||||
|
alignment: 0
|
||||||
|
pivot: {x: .5, y: .5}
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spritePackingTag:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
@ -1,2 +1,2 @@
|
|||||||
m_EditorVersion: 5.2.2f1
|
m_EditorVersion: 5.2.1f1
|
||||||
m_StandardAssetsVersion: 0
|
m_StandardAssetsVersion: 0
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user