Merge branch 'master' of https://github.com/new-00-0ne/System-Purge
# Conflicts: # Assets/Resources/Scripts.meta
This commit is contained in:
commit
ceff1eb851
107
Assets/AIScripts/hover.cs
Normal file
107
Assets/AIScripts/hover.cs
Normal file
@ -0,0 +1,107 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class hover : MonoBehaviour
|
||||
{
|
||||
|
||||
public LayerMask enemyMask;
|
||||
public float speed = 1;
|
||||
public bool flyPattern; // false is x-axis, true is y axis YOU HAPPY???? good
|
||||
public float maxFlightDistance = 0; // if flight distance is 0, fly foreva, probably should never do.. lol
|
||||
float distanceFlown;
|
||||
Rigidbody2D myBody;
|
||||
Transform myTrans;
|
||||
float myWidth, myHeight;
|
||||
float lastPos;
|
||||
|
||||
|
||||
// Use this for initialization
|
||||
void Start()
|
||||
{
|
||||
myTrans = this.transform;
|
||||
myBody = this.GetComponent<Rigidbody2D>();
|
||||
SpriteRenderer mySprite = this.GetComponent<SpriteRenderer>();
|
||||
myWidth = mySprite.bounds.extents.x;
|
||||
myHeight = mySprite.bounds.extents.y;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Update is called once per frame
|
||||
void FixedUpdate()
|
||||
{
|
||||
Vector2 lineCastPos;
|
||||
//check to see if there's something in front of us before moving forward
|
||||
if (flyPattern == false)
|
||||
{
|
||||
lineCastPos = myTrans.position.toVector2() - myTrans.right.toVector2() * myWidth + Vector2.up * myHeight;
|
||||
lineCastPos.y = lineCastPos.y - (myHeight * 1.2f);
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
lineCastPos = myTrans.position.toVector2() - myTrans.up.toVector2() * myWidth + Vector2.right * myHeight;
|
||||
lineCastPos.x -= myWidth;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Debug.DrawLine(lineCastPos, lineCastPos + Vector2.down * 0.05f);
|
||||
bool isBlockedY = Physics2D.Linecast(lineCastPos, lineCastPos + Vector2.down * 0.05f, enemyMask);
|
||||
Debug.DrawLine(lineCastPos, lineCastPos - myTrans.right.toVector2() * 0.05f);
|
||||
bool isBlockedX = Physics2D.Linecast(lineCastPos, lineCastPos - myTrans.right.toVector2() * 0.05f, enemyMask);
|
||||
|
||||
//if hit wall on x-axis ground turn around
|
||||
if ((isBlockedX && flyPattern == false) || (distanceFlown > maxFlightDistance && maxFlightDistance != 0 && flyPattern == false))
|
||||
{
|
||||
Vector3 currentRot = myTrans.eulerAngles;
|
||||
currentRot.y += 180;
|
||||
print(currentRot.x);
|
||||
myTrans.eulerAngles = currentRot;
|
||||
distanceFlown = 0;
|
||||
print("did it");
|
||||
}
|
||||
|
||||
//if hit wall on y-axis ground turn around
|
||||
else if((isBlockedY && flyPattern == true) || (distanceFlown > maxFlightDistance && maxFlightDistance != 0 && flyPattern == true))
|
||||
{
|
||||
Vector3 currentRot = myTrans.eulerAngles;
|
||||
currentRot.x += 180;
|
||||
print(currentRot.x);
|
||||
myTrans.eulerAngles = currentRot;
|
||||
print(myTrans.eulerAngles);
|
||||
distanceFlown = 0;
|
||||
print("did it");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Horizontal movement
|
||||
if (flyPattern == false)
|
||||
{
|
||||
Vector2 myVel = myBody.velocity;
|
||||
myVel.x = -myTrans.right.x * speed;
|
||||
distanceFlown += Mathf.Abs(lastPos - transform.position.x);
|
||||
//print(distanceFlown);
|
||||
myBody.velocity = myVel;
|
||||
lastPos = transform.position.x;
|
||||
|
||||
}
|
||||
//Vertickle movement
|
||||
if(flyPattern == true)
|
||||
{
|
||||
Vector2 myVel = myBody.velocity;
|
||||
myVel.y = -myTrans.up.y * speed;
|
||||
distanceFlown += Mathf.Abs(lastPos - transform.position.y);
|
||||
//print(distanceFlown);
|
||||
myBody.velocity = myVel;
|
||||
lastPos = transform.position.y;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
12
Assets/AIScripts/hover.cs.meta
Normal file
12
Assets/AIScripts/hover.cs.meta
Normal file
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7feb214d1ef985b4dac3410715f7e42c
|
||||
timeCreated: 1454129535
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
BIN
Assets/Cloud [moving]/CloudMove11.png
Normal file
BIN
Assets/Cloud [moving]/CloudMove11.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 104 KiB |
307
Assets/Cloud [moving]/CloudMove11.png.meta
Normal file
307
Assets/Cloud [moving]/CloudMove11.png.meta
Normal file
@ -0,0 +1,307 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a514eb9a8e956a14686e8ef835083a04
|
||||
timeCreated: 1454145859
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName:
|
||||
21300000: CloudMove11_0
|
||||
21300002: CloudMove11_1
|
||||
21300004: CloudMove11_2
|
||||
21300006: CloudMove11_3
|
||||
21300008: CloudMove11_4
|
||||
21300010: CloudMove11_5
|
||||
21300012: CloudMove11_6
|
||||
21300014: CloudMove11_7
|
||||
21300016: CloudMove11_8
|
||||
21300018: CloudMove11_9
|
||||
21300020: CloudMove11_10
|
||||
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: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
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: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 8
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites:
|
||||
- name: CloudMove11_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 17
|
||||
y: 31
|
||||
width: 346
|
||||
height: 169
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline:
|
||||
- - {x: 65.39419, y: 14.307053}
|
||||
- {x: 64.39419, y: 11.307053}
|
||||
- {x: 64.39419, y: 2.3070526}
|
||||
- {x: 64.39419, y: 7.3070526}
|
||||
- {x: 62.394188, y: 9.307053}
|
||||
- {x: 64.39419, y: 33.307053}
|
||||
- {x: 36.394188, y: 41.307053}
|
||||
- {x: -66.60581, y: 41.307053}
|
||||
- {x: -82.60581, y: 25.307053}
|
||||
- {x: -82.60581, y: -38.692947}
|
||||
- {x: 28.394188, y: -38.692947}
|
||||
- {x: 86.39419, y: -23.692947}
|
||||
- {x: 86.39419, y: 5.3070526}
|
||||
- {x: 84.39419, y: 17.307053}
|
||||
- name: CloudMove11_1
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 365
|
||||
y: 31
|
||||
width: 345
|
||||
height: 169
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline:
|
||||
- - {x: 71.72821, y: 15.307053}
|
||||
- {x: 64.72821, y: 12.307053}
|
||||
- {x: 63.72821, y: 32.307053}
|
||||
- {x: 6.7282104, y: 41.307053}
|
||||
- {x: -55.27179, y: 41.307053}
|
||||
- {x: -75.27179, y: 29.307053}
|
||||
- {x: -85.27179, y: 4.3070526}
|
||||
- {x: -85.27179, y: -37.692947}
|
||||
- {x: -64.27179, y: -38.692947}
|
||||
- {x: 38.72821, y: -38.692947}
|
||||
- {x: 81.72821, y: -25.692947}
|
||||
- {x: 85.72821, y: -12.692947}
|
||||
- {x: 85.72821, y: 15.307053}
|
||||
- name: CloudMove11_2
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 711
|
||||
y: 32
|
||||
width: 347
|
||||
height: 169
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline:
|
||||
- - {x: 27.074677, y: 39.30083}
|
||||
- {x: -44.925323, y: 39.30083}
|
||||
- {x: -85.92532, y: 26.30083}
|
||||
- {x: -85.92532, y: -37.69917}
|
||||
- {x: -45.925323, y: -39.69917}
|
||||
- {x: 33.074677, y: -39.69917}
|
||||
- {x: 83.07468, y: -25.69917}
|
||||
- {x: 83.07468, y: 3.3008308}
|
||||
- {x: 64.07468, y: 36.30083}
|
||||
- - {x: 67.07468, y: 1.3008308}
|
||||
- {x: 68.07468, y: -0.69916916}
|
||||
- {x: 85.07468, y: -0.69916916}
|
||||
- {x: 85.07468, y: 14.300831}
|
||||
- {x: 72.07468, y: 14.300831}
|
||||
- {x: 67.07468, y: 10.300831}
|
||||
- name: CloudMove11_3
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1387
|
||||
y: 28
|
||||
width: 347
|
||||
height: 166
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline:
|
||||
- - {x: -79.63275, y: 2.3257256}
|
||||
- {x: -79.63275, y: -35.674274}
|
||||
- {x: -53.63275, y: -37.674274}
|
||||
- {x: 86.36725, y: -37.674274}
|
||||
- {x: 86.36725, y: 12.325726}
|
||||
- {x: 69.36725, y: 40.325726}
|
||||
- {x: -47.63275, y: 40.325726}
|
||||
- {x: -67.63275, y: 26.325726}
|
||||
- name: CloudMove11_4
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1738
|
||||
y: 28
|
||||
width: 335
|
||||
height: 165
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline:
|
||||
- - {x: -55.817444, y: 41.325726}
|
||||
- {x: -68.817444, y: 30.325726}
|
||||
- {x: -79.817444, y: 3.3257256}
|
||||
- {x: -79.817444, y: -37.674274}
|
||||
- {x: 83.182556, y: -37.674274}
|
||||
- {x: 83.182556, y: 17.325726}
|
||||
- {x: 67.182556, y: 41.325726}
|
||||
- name: CloudMove11_5
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 2081
|
||||
y: 33
|
||||
width: 338
|
||||
height: 175
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline:
|
||||
- - {x: 48.54773, y: 23.794605}
|
||||
- {x: 23.54773, y: 33.794605}
|
||||
- {x: -58.45227, y: 33.794605}
|
||||
- {x: -78.45227, y: 6.7946053}
|
||||
- {x: -78.45227, y: -38.205395}
|
||||
- {x: 43.54773, y: -38.205395}
|
||||
- {x: 84.54773, y: -29.205395}
|
||||
- {x: 84.54773, y: -5.2053947}
|
||||
- {x: 83.54773, y: -3.2053947}
|
||||
- name: CloudMove11_6
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 2422
|
||||
y: 25
|
||||
width: 340
|
||||
height: 174
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline:
|
||||
- - {x: 32.425293, y: 22.844398}
|
||||
- {x: 30.425293, y: 20.844398}
|
||||
- {x: 30.425293, y: 8.8443985}
|
||||
- {x: 28.425293, y: 12.8443985}
|
||||
- {x: 26.425293, y: 14.8443985}
|
||||
- {x: 30.425293, y: 18.844398}
|
||||
- {x: 30.425293, y: 28.844398}
|
||||
- {x: 32.425293, y: 36.8444}
|
||||
- {x: 26.425293, y: 38.8444}
|
||||
- {x: -45.574707, y: 38.8444}
|
||||
- {x: -80.57471, y: 19.844398}
|
||||
- {x: -80.57471, y: -29.155602}
|
||||
- {x: -79.57471, y: -37.1556}
|
||||
- {x: 41.425293, y: -37.1556}
|
||||
- {x: 85.42529, y: -27.155602}
|
||||
- {x: 85.42529, y: 8.8443985}
|
||||
- {x: 50.425293, y: 30.844398}
|
||||
- name: CloudMove11_7
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 2769
|
||||
y: 28
|
||||
width: 333
|
||||
height: 163
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline:
|
||||
- - {x: -76.2345, y: 38.825726}
|
||||
- {x: -79.2345, y: 35.825726}
|
||||
- {x: -79.2345, y: -35.174274}
|
||||
- {x: 55.765503, y: -35.174274}
|
||||
- {x: 82.7655, y: -31.174274}
|
||||
- {x: 82.7655, y: 27.825726}
|
||||
- {x: 40.765503, y: 38.825726}
|
||||
- name: CloudMove11_8
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 3104
|
||||
y: 30
|
||||
width: 344
|
||||
height: 167
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline:
|
||||
- - {x: -63.819458, y: 38.81328}
|
||||
- {x: -80.81946, y: 35.81328}
|
||||
- {x: -80.81946, y: -35.18672}
|
||||
- {x: 46.180542, y: -35.18672}
|
||||
- {x: 86.18054, y: -26.186722}
|
||||
- {x: 86.18054, y: 24.813278}
|
||||
- {x: 47.180542, y: 38.81328}
|
||||
- - {x: -84.81946, y: -25.186722}
|
||||
- {x: -81.81946, y: -24.186722}
|
||||
- {x: -81.81946, y: -4.186722}
|
||||
- {x: -83.81946, y: -2.1867218}
|
||||
- {x: -84.81946, y: -2.1867218}
|
||||
- name: CloudMove11_9
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 3450
|
||||
y: 27
|
||||
width: 340
|
||||
height: 174
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline:
|
||||
- - {x: -59.973022, y: 39.83195}
|
||||
- {x: -79.97302, y: 25.831951}
|
||||
- {x: -80.97302, y: 19.831951}
|
||||
- {x: -80.97302, y: -37.16805}
|
||||
- {x: 67.02698, y: -37.16805}
|
||||
- {x: 85.02698, y: -24.168049}
|
||||
- {x: 85.02698, y: 21.831951}
|
||||
- {x: 14.026978, y: 39.83195}
|
||||
- name: CloudMove11_10
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 3794
|
||||
y: 28
|
||||
width: 342
|
||||
height: 174
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline:
|
||||
- - {x: -53.614136, y: 43.325726}
|
||||
- {x: -79.614136, y: 31.325726}
|
||||
- {x: -81.614136, y: 23.325726}
|
||||
- {x: -81.614136, y: -36.674274}
|
||||
- {x: 27.385864, y: -36.674274}
|
||||
- {x: 85.385864, y: -21.674274}
|
||||
- {x: 85.385864, y: 27.325726}
|
||||
- {x: 54.385864, y: 43.325726}
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Cloud [moving]/CloudMove11_0.controller
Normal file
BIN
Assets/Cloud [moving]/CloudMove11_0.controller
Normal file
Binary file not shown.
8
Assets/Cloud [moving]/CloudMove11_0.controller.meta
Normal file
8
Assets/Cloud [moving]/CloudMove11_0.controller.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3de61aeb7dc7f894ca9ec2ebf466f780
|
||||
timeCreated: 1454145870
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Cloud [moving]/New Animation.anim
Normal file
BIN
Assets/Cloud [moving]/New Animation.anim
Normal file
Binary file not shown.
8
Assets/Cloud [moving]/New Animation.anim.meta
Normal file
8
Assets/Cloud [moving]/New Animation.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c9c3ab456f171c04e9d53386f58de605
|
||||
timeCreated: 1454145870
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
9
Assets/Resources/Prefabs.meta
Normal file
9
Assets/Resources/Prefabs.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 77b030cbe6e55b84995e0b19ad5edf41
|
||||
folderAsset: yes
|
||||
timeCreated: 1454137016
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Resources/Prefabs/Platform_DefaultSprite.prefab
Normal file
BIN
Assets/Resources/Prefabs/Platform_DefaultSprite.prefab
Normal file
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0b6ab4d9290eb1340871ca2a666fdf3a
|
||||
timeCreated: 1454137026
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Resources/Prefabs/x16_Platform.prefab
Normal file
BIN
Assets/Resources/Prefabs/x16_Platform.prefab
Normal file
Binary file not shown.
8
Assets/Resources/Prefabs/x16_Platform.prefab.meta
Normal file
8
Assets/Resources/Prefabs/x16_Platform.prefab.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b24aa21b811dc7d4f98eeafda566a7de
|
||||
timeCreated: 1454147342
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Resources/Prefabs/x2_Platform_new.prefab
Normal file
BIN
Assets/Resources/Prefabs/x2_Platform_new.prefab
Normal file
Binary file not shown.
8
Assets/Resources/Prefabs/x2_Platform_new.prefab.meta
Normal file
8
Assets/Resources/Prefabs/x2_Platform_new.prefab.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e84c73f9ff3d6fb468df5e4dc834fd4f
|
||||
timeCreated: 1454144250
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Resources/Prefabs/x4_Platform_new 1.prefab
Normal file
BIN
Assets/Resources/Prefabs/x4_Platform_new 1.prefab
Normal file
Binary file not shown.
8
Assets/Resources/Prefabs/x4_Platform_new 1.prefab.meta
Normal file
8
Assets/Resources/Prefabs/x4_Platform_new 1.prefab.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bec599c809fc7bc4194516670d1ada7e
|
||||
timeCreated: 1454144137
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Resources/Prefabs/x8_Platform.prefab
Normal file
BIN
Assets/Resources/Prefabs/x8_Platform.prefab
Normal file
Binary file not shown.
8
Assets/Resources/Prefabs/x8_Platform.prefab.meta
Normal file
8
Assets/Resources/Prefabs/x8_Platform.prefab.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b5f931d467be3b4cbc9c1c4129cb92e
|
||||
timeCreated: 1454147296
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Resources/Scenes/ParallaxTestScene.unity
Normal file
BIN
Assets/Resources/Scenes/ParallaxTestScene.unity
Normal file
Binary file not shown.
8
Assets/Resources/Scenes/ParallaxTestScene.unity.meta
Normal file
8
Assets/Resources/Scenes/ParallaxTestScene.unity.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27d7709280a5b514890dd38180451ab3
|
||||
timeCreated: 1454146154
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Resources/Scenes/PlatformTestScene.unity
Normal file
BIN
Assets/Resources/Scenes/PlatformTestScene.unity
Normal file
Binary file not shown.
8
Assets/Resources/Scenes/PlatformTestScene.unity.meta
Normal file
8
Assets/Resources/Scenes/PlatformTestScene.unity.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 72a1b0a7d41c0424083f12b50eaa8b53
|
||||
timeCreated: 1454122295
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
<<<<<<< HEAD
|
||||
guid: 64eb7d9ed985af14f93082fb8c824b52
|
||||
folderAsset: yes
|
||||
timeCreated: 1454135134
|
||||
=======
|
||||
guid: 3fa83265e1d3e234db4e457a26505779
|
||||
folderAsset: yes
|
||||
timeCreated: 1454123185
|
||||
>>>>>>> 165b5bb788e9920502000c390e44e4ab371c3b34
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
|
@ -15,6 +15,7 @@ public class GameManager : MonoBehaviour
|
||||
{
|
||||
if (gManager == null)
|
||||
{
|
||||
DontDestroyOnLoad(gameObject);
|
||||
gManager = this;
|
||||
iManager = new InputManager(0.1f, 0.2f);
|
||||
tagged_objects = GameObject.FindGameObjectsWithTag("Scene_Object");
|
||||
|
44
Assets/Resources/Scripts/Platform.cs
Normal file
44
Assets/Resources/Scripts/Platform.cs
Normal file
@ -0,0 +1,44 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
[ExecuteInEditMode]
|
||||
public class Platform : MonoBehaviour
|
||||
{
|
||||
public Sprite sprite;
|
||||
public int addNum;
|
||||
public GameObject prefab;
|
||||
public bool isParent = true;
|
||||
int oldNum = 0;
|
||||
|
||||
// Update is called once per frame
|
||||
void Update ()
|
||||
{
|
||||
//Updates all of the children's SpriteRender sprites
|
||||
foreach (SpriteRenderer i in GetComponentsInChildren<SpriteRenderer>())
|
||||
{
|
||||
i.sprite = sprite;
|
||||
}
|
||||
|
||||
/*Vector3 curPos = this.transform.position;
|
||||
float scaleX = this.transform.lossyScale.x;
|
||||
|
||||
if (this.gameObject.transform.childCount < addNum && !Application.isPlaying && isParent)
|
||||
{
|
||||
for (int i = 0; i < addNum - oldNum; i++)
|
||||
{
|
||||
curPos = curPos + new Vector3(scaleX, 0);
|
||||
GameObject childObj = Instantiate(prefab, curPos, Quaternion.identity) as GameObject;
|
||||
childObj.GetComponent<Platform>().isParent = false;
|
||||
childObj.transform.parent = transform;
|
||||
curPos = childObj.transform.position;
|
||||
transform.GetChild(transform.childCount);
|
||||
}
|
||||
for (int i = 0; i < oldNum - addNum; i++)
|
||||
{
|
||||
Destroy(transform.GetChild(transform.childCount));
|
||||
}
|
||||
oldNum = addNum;
|
||||
}*/
|
||||
}
|
||||
}
|
12
Assets/Resources/Scripts/Platform.cs.meta
Normal file
12
Assets/Resources/Scripts/Platform.cs.meta
Normal file
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a62f48d093e14da4688460ed30cf5da0
|
||||
timeCreated: 1454130969
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
9
Assets/Sprites/Parallex Test Sprites.meta
Normal file
9
Assets/Sprites/Parallex Test Sprites.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c6ae2a1ef27c1d44bbeceffc517b86f6
|
||||
folderAsset: yes
|
||||
timeCreated: 1454144874
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sprites/Parallex Test Sprites/BackgroundA.png
Normal file
BIN
Assets/Sprites/Parallex Test Sprites/BackgroundA.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 MiB |
57
Assets/Sprites/Parallex Test Sprites/BackgroundA.png.meta
Normal file
57
Assets/Sprites/Parallex Test Sprites/BackgroundA.png.meta
Normal file
@ -0,0 +1,57 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a4d044102bc4bf41b221971ea213976
|
||||
timeCreated: 1454144893
|
||||
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: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
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: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 8
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sprites/Parallex Test Sprites/medGround.png
Normal file
BIN
Assets/Sprites/Parallex Test Sprites/medGround.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
57
Assets/Sprites/Parallex Test Sprites/medGround.png.meta
Normal file
57
Assets/Sprites/Parallex Test Sprites/medGround.png.meta
Normal file
@ -0,0 +1,57 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c901bb5c7fa43d244acb40a68512a167
|
||||
timeCreated: 1454144895
|
||||
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: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
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: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 8
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sprites/Parallex Test Sprites/midGround.png
Normal file
BIN
Assets/Sprites/Parallex Test Sprites/midGround.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 262 KiB |
57
Assets/Sprites/Parallex Test Sprites/midGround.png.meta
Normal file
57
Assets/Sprites/Parallex Test Sprites/midGround.png.meta
Normal file
@ -0,0 +1,57 @@
|
||||
fileFormatVersion: 2
|
||||
guid: afd6bdca0dd3e87408e5681410461a5d
|
||||
timeCreated: 1454144895
|
||||
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: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
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: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 8
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sprites/WhiteSquare.png
Normal file
BIN
Assets/Sprites/WhiteSquare.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 78 B |
61
Assets/Sprites/WhiteSquare.png.meta
Normal file
61
Assets/Sprites/WhiteSquare.png.meta
Normal file
@ -0,0 +1,61 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ed93067855c543d4bbf504ad060cbad0
|
||||
timeCreated: 1454143658
|
||||
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: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 4
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: 0
|
||||
aniso: 16
|
||||
mipBias: 0
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 3
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 4
|
||||
alphaIsTransparency: 1
|
||||
textureType: 8
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
outline:
|
||||
- - {x: 0, y: 0}
|
||||
- {x: 0, y: 4}
|
||||
- {x: 4, y: 4}
|
||||
- {x: 4, y: 0}
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
Reference in New Issue
Block a user