mirror of
https://github.com/ConjureETS/Labo_2_Equ_1_a15.git
synced 2026-03-24 01:50:58 +00:00
prefab ennemy et floor pour patrol
This commit is contained in:
parent
08dac02a63
commit
8426a784f8
9
Assets/Prefabs.meta
Normal file
9
Assets/Prefabs.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f9204b0ff046b78438022b154aebf1c1
|
||||
folderAsset: yes
|
||||
timeCreated: 1447284916
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Prefabs/Enemy.prefab
Normal file
BIN
Assets/Prefabs/Enemy.prefab
Normal file
Binary file not shown.
8
Assets/Prefabs/Enemy.prefab.meta
Normal file
8
Assets/Prefabs/Enemy.prefab.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd943a16d07906c4e82954299bcf4dd3
|
||||
timeCreated: 1447285149
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Prefabs/Floor.prefab
Normal file
BIN
Assets/Prefabs/Floor.prefab
Normal file
Binary file not shown.
8
Assets/Prefabs/Floor.prefab.meta
Normal file
8
Assets/Prefabs/Floor.prefab.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3d5d4b679380caf4e9eb6959973b5bae
|
||||
timeCreated: 1447285157
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
22
Assets/Scripts/DirectionChangeTrigger.cs
Normal file
22
Assets/Scripts/DirectionChangeTrigger.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class DirectionChangeTrigger : MonoBehaviour {
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
|
||||
}
|
||||
|
||||
void OnTriggerEnter2D(Collider2D other) {
|
||||
if( other.gameObject.tag == "Ennemy" ){
|
||||
other.gameObject.GetComponent<Patrolling>().setDirection(- other.gameObject.GetComponent<Patrolling>().getDirection());
|
||||
print("TriggerEnter");
|
||||
}
|
||||
}
|
||||
}
|
||||
12
Assets/Scripts/DirectionChangeTrigger.cs.meta
Normal file
12
Assets/Scripts/DirectionChangeTrigger.cs.meta
Normal file
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d4ed5a831e76a9946a2df20bb4fb30f2
|
||||
timeCreated: 1447285007
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
30
Assets/Scripts/Patrolling.cs
Normal file
30
Assets/Scripts/Patrolling.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class Patrolling : MonoBehaviour {
|
||||
|
||||
|
||||
private float direction = 0.5f;
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
this.transform.Translate(direction, 0, 0);
|
||||
}
|
||||
|
||||
void FixedUpdate() {
|
||||
}
|
||||
|
||||
public void setDirection(float value) {
|
||||
direction = value;
|
||||
}
|
||||
|
||||
public float getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
}
|
||||
12
Assets/Scripts/Patrolling.cs.meta
Normal file
12
Assets/Scripts/Patrolling.cs.meta
Normal file
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: be63d981612586b44828f7fac8c05892
|
||||
timeCreated: 1447284995
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Sprites/enemySprite.png
Normal file
BIN
Assets/Sprites/enemySprite.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
56
Assets/Sprites/enemySprite.png.meta
Normal file
56
Assets/Sprites/enemySprite.png.meta
Normal file
@ -0,0 +1,56 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9cfe065510073d349b298b7fb7ea20dc
|
||||
timeCreated: 1447285180
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
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: -1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 1
|
||||
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: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,9 +1,43 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f99e95040eb0224da6a48b1c6cbe457
|
||||
timeCreated: 1446084884
|
||||
timeCreated: 1447285243
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
fileIDToRecycleName:
|
||||
21300000: mm1cuttiles_0
|
||||
21300002: mm1cuttiles_1
|
||||
21300004: mm1cuttiles_2
|
||||
21300006: mm1cuttiles_3
|
||||
21300008: mm1cuttiles_4
|
||||
21300010: mm1cuttiles_5
|
||||
21300012: mm1cuttiles_6
|
||||
21300014: mm1cuttiles_7
|
||||
21300016: mm1cuttiles_8
|
||||
21300018: mm1cuttiles_9
|
||||
21300020: mm1cuttiles_10
|
||||
21300022: mm1cuttiles_11
|
||||
21300024: mm1cuttiles_12
|
||||
21300026: mm1cuttiles_13
|
||||
21300028: mm1cuttiles_14
|
||||
21300030: mm1cuttiles_15
|
||||
21300032: mm1cuttiles_16
|
||||
21300034: mm1cuttiles_17
|
||||
21300036: mm1cuttiles_18
|
||||
21300038: mm1cuttiles_19
|
||||
21300040: mm1cuttiles_20
|
||||
21300042: mm1cuttiles_21
|
||||
21300044: mm1cuttiles_22
|
||||
21300046: mm1cuttiles_23
|
||||
21300048: mm1cuttiles_24
|
||||
21300050: mm1cuttiles_25
|
||||
21300052: mm1cuttiles_26
|
||||
21300054: mm1cuttiles_27
|
||||
21300056: mm1cuttiles_28
|
||||
21300058: mm1cuttiles_29
|
||||
21300060: mm1cuttiles_30
|
||||
21300062: mm1cuttiles_31
|
||||
21300064: mm1cuttiles_32
|
||||
21300066: mm1cuttiles_33
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
@ -30,7 +64,7 @@ TextureImporter:
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
aniso: 16
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
@ -38,7 +72,7 @@ TextureImporter:
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 1
|
||||
spriteMode: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
@ -49,7 +83,347 @@ TextureImporter:
|
||||
textureType: 8
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
sprites:
|
||||
- name: mm1cuttiles_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1
|
||||
y: 52
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_1
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 18
|
||||
y: 52
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_2
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 35
|
||||
y: 52
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_3
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 52
|
||||
y: 52
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_4
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 69
|
||||
y: 52
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_5
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 86
|
||||
y: 52
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_6
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 103
|
||||
y: 52
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_7
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 120
|
||||
y: 52
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_8
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1
|
||||
y: 35
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_9
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 18
|
||||
y: 35
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_10
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 35
|
||||
y: 35
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_11
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 52
|
||||
y: 35
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_12
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 69
|
||||
y: 35
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_13
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 86
|
||||
y: 35
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_14
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 103
|
||||
y: 35
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_15
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 120
|
||||
y: 35
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_16
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 137
|
||||
y: 35
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_17
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1
|
||||
y: 18
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_18
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 18
|
||||
y: 18
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_19
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 35
|
||||
y: 18
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_20
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 52
|
||||
y: 18
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_21
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 69
|
||||
y: 18
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_22
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 86
|
||||
y: 18
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_23
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 103
|
||||
y: 18
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_24
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 120
|
||||
y: 18
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_25
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 137
|
||||
y: 1
|
||||
width: 16
|
||||
height: 33
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_26
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1
|
||||
y: 1
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_27
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 18
|
||||
y: 1
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_28
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 35
|
||||
y: 1
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_29
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 52
|
||||
y: 1
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_30
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 69
|
||||
y: 1
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_31
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 86
|
||||
y: 1
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_32
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 103
|
||||
y: 1
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
- name: mm1cuttiles_33
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 120
|
||||
y: 1
|
||||
width: 16
|
||||
height: 16
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user