Browse Source

sorta works

weapons
Lachlan 9 years ago
parent
commit
8baa600cb9
58 changed files with 758 additions and 0 deletions
  1. BIN
      PinataSmackdown_unity/.DS_Store
  2. BIN
      PinataSmackdown_unity/Assets/.DS_Store
  3. BIN
      PinataSmackdown_unity/Assets/Lachlan_jump_work.unity
  4. +4
    -0
      PinataSmackdown_unity/Assets/Lachlan_jump_work.unity.meta
  5. BIN
      PinataSmackdown_unity/Assets/Main Camera.prefab
  6. +4
    -0
      PinataSmackdown_unity/Assets/Main Camera.prefab.meta
  7. +5
    -0
      PinataSmackdown_unity/Assets/Materials.meta
  8. BIN
      PinataSmackdown_unity/Assets/Materials/lambert1.mat
  9. +4
    -0
      PinataSmackdown_unity/Assets/Materials/lambert1.mat.meta
  10. BIN
      PinataSmackdown_unity/Assets/Materials/pillar_unrapped 1.mat
  11. +4
    -0
      PinataSmackdown_unity/Assets/Materials/pillar_unrapped 1.mat.meta
  12. BIN
      PinataSmackdown_unity/Assets/Materials/pillar_unrapped.mat
  13. +4
    -0
      PinataSmackdown_unity/Assets/Materials/pillar_unrapped.mat.meta
  14. BIN
      PinataSmackdown_unity/Assets/Materials/platform_texture.mat
  15. +4
    -0
      PinataSmackdown_unity/Assets/Materials/platform_texture.mat.meta
  16. BIN
      PinataSmackdown_unity/Assets/New Terrain.asset
  17. +4
    -0
      PinataSmackdown_unity/Assets/New Terrain.asset.meta
  18. +56
    -0
      PinataSmackdown_unity/Assets/P1weapon.cs
  19. +8
    -0
      PinataSmackdown_unity/Assets/P1weapon.cs.meta
  20. +56
    -0
      PinataSmackdown_unity/Assets/P2_weapon.cs
  21. +8
    -0
      PinataSmackdown_unity/Assets/P2_weapon.cs.meta
  22. BIN
      PinataSmackdown_unity/Assets/Platform_obj.fbx
  23. +99
    -0
      PinataSmackdown_unity/Assets/Platform_obj.fbx.meta
  24. +62
    -0
      PinataSmackdown_unity/Assets/PlayerControler.cs
  25. +8
    -0
      PinataSmackdown_unity/Assets/PlayerControler.cs.meta
  26. BIN
      PinataSmackdown_unity/Assets/bounce.physicsMaterial2D
  27. +4
    -0
      PinataSmackdown_unity/Assets/bounce.physicsMaterial2D.meta
  28. BIN
      PinataSmackdown_unity/Assets/bullet.prefab
  29. +4
    -0
      PinataSmackdown_unity/Assets/bullet.prefab.meta
  30. +15
    -0
      PinataSmackdown_unity/Assets/bulletScript.cs
  31. +8
    -0
      PinataSmackdown_unity/Assets/bulletScript.cs.meta
  32. +13
    -0
      PinataSmackdown_unity/Assets/camera_controls.cs
  33. +8
    -0
      PinataSmackdown_unity/Assets/camera_controls.cs.meta
  34. BIN
      PinataSmackdown_unity/Assets/floating_platform_02.mb
  35. +105
    -0
      PinataSmackdown_unity/Assets/floating_platform_02.mb.meta
  36. BIN
      PinataSmackdown_unity/Assets/pillar_obj.fbx
  37. +83
    -0
      PinataSmackdown_unity/Assets/pillar_obj.fbx.meta
  38. BIN
      PinataSmackdown_unity/Assets/pillar_unrapped.jpg
  39. +47
    -0
      PinataSmackdown_unity/Assets/pillar_unrapped.jpg.meta
  40. BIN
      PinataSmackdown_unity/Assets/platform_texture.jpg
  41. +47
    -0
      PinataSmackdown_unity/Assets/platform_texture.jpg.meta
  42. +62
    -0
      PinataSmackdown_unity/Assets/player2_controls.cs
  43. +8
    -0
      PinataSmackdown_unity/Assets/player2_controls.cs.meta
  44. +16
    -0
      PinataSmackdown_unity/Assets/sc.cs
  45. +8
    -0
      PinataSmackdown_unity/Assets/sc.cs.meta
  46. BIN
      PinataSmackdown_unity/ProjectSettings/AudioManager.asset
  47. BIN
      PinataSmackdown_unity/ProjectSettings/DynamicsManager.asset
  48. BIN
      PinataSmackdown_unity/ProjectSettings/EditorBuildSettings.asset
  49. BIN
      PinataSmackdown_unity/ProjectSettings/EditorSettings.asset
  50. BIN
      PinataSmackdown_unity/ProjectSettings/GraphicsSettings.asset
  51. BIN
      PinataSmackdown_unity/ProjectSettings/InputManager.asset
  52. BIN
      PinataSmackdown_unity/ProjectSettings/NavMeshLayers.asset
  53. BIN
      PinataSmackdown_unity/ProjectSettings/NetworkManager.asset
  54. BIN
      PinataSmackdown_unity/ProjectSettings/Physics2DSettings.asset
  55. BIN
      PinataSmackdown_unity/ProjectSettings/ProjectSettings.asset
  56. BIN
      PinataSmackdown_unity/ProjectSettings/QualitySettings.asset
  57. BIN
      PinataSmackdown_unity/ProjectSettings/TagManager.asset
  58. BIN
      PinataSmackdown_unity/ProjectSettings/TimeManager.asset

BIN
PinataSmackdown_unity/.DS_Store View File


BIN
PinataSmackdown_unity/Assets/.DS_Store View File


BIN
PinataSmackdown_unity/Assets/Lachlan_jump_work.unity View File


+ 4
- 0
PinataSmackdown_unity/Assets/Lachlan_jump_work.unity.meta View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 7929efa0d0fa84d269f932355f708f12
DefaultImporter:
userData:

BIN
PinataSmackdown_unity/Assets/Main Camera.prefab View File


+ 4
- 0
PinataSmackdown_unity/Assets/Main Camera.prefab.meta View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: c9c7412211778407f9c1450e23c597fc
NativeFormatImporter:
userData:

+ 5
- 0
PinataSmackdown_unity/Assets/Materials.meta View File

@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: 334a07353496b3f4682903e0a28dbad0
folderAsset: yes
DefaultImporter:
userData:

BIN
PinataSmackdown_unity/Assets/Materials/lambert1.mat View File


+ 4
- 0
PinataSmackdown_unity/Assets/Materials/lambert1.mat.meta View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: ef3b7b6cdc3ee234899234695bd8d7c3
NativeFormatImporter:
userData:

BIN
PinataSmackdown_unity/Assets/Materials/pillar_unrapped 1.mat View File


+ 4
- 0
PinataSmackdown_unity/Assets/Materials/pillar_unrapped 1.mat.meta View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 001b004239ebbc846b32fe5e3bbab73c
NativeFormatImporter:
userData:

BIN
PinataSmackdown_unity/Assets/Materials/pillar_unrapped.mat View File


+ 4
- 0
PinataSmackdown_unity/Assets/Materials/pillar_unrapped.mat.meta View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 4e19020496989f94dba07a0025059bcf
NativeFormatImporter:
userData:

BIN
PinataSmackdown_unity/Assets/Materials/platform_texture.mat View File


+ 4
- 0
PinataSmackdown_unity/Assets/Materials/platform_texture.mat.meta View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 0ed59f0aa227af74e943e157e83fd03e
NativeFormatImporter:
userData:

BIN
PinataSmackdown_unity/Assets/New Terrain.asset View File


+ 4
- 0
PinataSmackdown_unity/Assets/New Terrain.asset.meta View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: a03922fd2222daf45aa6220f0ae167ad
NativeFormatImporter:
userData:

+ 56
- 0
PinataSmackdown_unity/Assets/P1weapon.cs View File

@ -0,0 +1,56 @@
using UnityEngine;
using System.Collections;
public class P1weapon : MonoBehaviour {
public float pushMagnitude = 500;
void Start () {
renderer.enabled = false;
}
void Update (){
if (Input.GetKeyDown (KeyCode.KeypadEnter)) {
// show
renderer.enabled = true;
collider2D.enabled = true;
}
if (Input.GetKeyUp (KeyCode.KeypadEnter)){
renderer.enabled = false;
collider2D.enabled = false;
}
}
void OnCollisionEnter2D (Collision2D other){
Vector2 ab = new Vector2 (0, 0);
//pushmagntiude
if (other.gameObject.name == "Cube2") {
//Get a and b
Vector2 a;
Vector2 b;
a = transform.position;
b = other.transform.position;
//Calculate AB->
ab = b - a;
Debug.Log (ab);
//Modify to add height
ab = new Vector2 (ab.x,ab.y +0.8f);
Debug.Log (ab);
//Normalise AB
ab.Normalize();
Debug.Log (ab);
//Multiple AB by push magnitude
ab = ab * pushMagnitude;
Debug.Log (ab);
//Push opponent by AB * magnitude
other.gameObject.rigidbody2D.AddForce (ab, ForceMode2D.Force);
other.gameObject.GetComponent<player2_controls>().Pushed();
}
}
// Update is called once per frame
}

+ 8
- 0
PinataSmackdown_unity/Assets/P1weapon.cs.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 048f4317d0f555545a68dd6b84173109
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

+ 56
- 0
PinataSmackdown_unity/Assets/P2_weapon.cs View File

@ -0,0 +1,56 @@
using UnityEngine;
using System.Collections;
public class P2_weapon : MonoBehaviour {
public float pushMagnitude = 500;
void Start () {
renderer.enabled = false;
}
void Update (){
if (Input.GetKeyDown (KeyCode.Space)) {
// show
renderer.enabled = true;
collider2D.enabled = true;
}
if (Input.GetKeyUp (KeyCode.Space)){
renderer.enabled = false;
collider2D.enabled = false;
}
}
void OnCollisionEnter2D (Collision2D col){
Vector2 ab = new Vector2 (0, 0);
//pushmagntiude
if (col.gameObject.name == "Cube") {
//Get a and b
Vector2 a;
Vector2 b;
a = transform.position;
b = col.transform.position;
//Calculate AB->
ab = b - a;
Debug.Log (ab);
//Modify to add height
ab = new Vector2 (ab.x,ab.y +0.8f);
Debug.Log (ab);
//Normalise AB
ab.Normalize();
Debug.Log (ab);
//Multiple AB by push magnitude
ab = ab * pushMagnitude;
Debug.Log (ab);
//Push opponent by AB * magnitude
col.gameObject.rigidbody2D.AddForce (ab, ForceMode2D.Force);
col.gameObject.GetComponent<PlayerControler>().Pushed();
}
}
// Update is called once per frame
}

+ 8
- 0
PinataSmackdown_unity/Assets/P2_weapon.cs.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f348d28f3452e574c9fe07574e3ca5ee
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

BIN
PinataSmackdown_unity/Assets/Platform_obj.fbx View File


+ 99
- 0
PinataSmackdown_unity/Assets/Platform_obj.fbx.meta View File

@ -0,0 +1,99 @@
fileFormatVersion: 2
guid: 96897ea8068e16045a2b6b10cf1b62dd
ModelImporter:
serializedVersion: 16
fileIDToRecycleName:
100000: pCube1
100002: pCylinder1
100004: //RootNode
100006: polySurface2
100008: polySurface3
100010: polySurface4
100012: polySurface5
100014: polySurface6
100016: polySurface7
100018: polySurface9
100020: transform1
100022: transform2
100024: transform3
100026: transform4
100028: transform5
100030: transform6
100032: transform7
100034: transform8
400000: pCube1
400002: pCylinder1
400004: //RootNode
400006: polySurface2
400008: polySurface3
400010: polySurface4
400012: polySurface5
400014: polySurface6
400016: polySurface7
400018: polySurface9
400020: transform1
400022: transform2
400024: transform3
400026: transform4
400028: transform5
400030: transform6
400032: transform7
400034: transform8
2300000: polySurface9
3300000: polySurface9
4300000: polySurface9
9500000: //RootNode
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
optimizeGameObjects: 0
motionNodeName:
animationCompression: 1
animationRotationError: .5
animationPositionError: .5
animationScaleError: .5
animationWrapMode: 0
extraExposedTransformPaths: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: .00999999978
meshCompression: 0
addColliders: 0
importBlendShapes: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
weldVertices: 1
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
tangentSpace:
normalSmoothAngle: 60
splitTangentsAcrossUV: 1
normalImportMode: 0
tangentImportMode: 1
importAnimation: 1
copyAvatar: 0
humanDescription:
human: []
skeleton: []
armTwist: .5
foreArmTwist: .5
upperLegTwist: .5
legTwist: .5
armStretch: .0500000007
legStretch: .0500000007
feetSpacing: 0
rootMotionBoneName:
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 2
additionalBone: 0
userData:

+ 62
- 0
PinataSmackdown_unity/Assets/PlayerControler.cs View File

@ -0,0 +1,62 @@
using UnityEngine;
using System.Collections;
public class PlayerControler : MonoBehaviour {
void Start () {
}
bool pushed = false;
public float speed;
public Vector2 jumpVector;
public GameObject bullet;
bool canJump = true;
bool facingLeft = true;
float currentSpeed;
float pushtime;
void Update() {
if (!pushed) {
Vector2 velo = rigidbody2D.velocity;
velo.x = (Input.GetAxis ("Horizontal_P1") * speed);
rigidbody2D.velocity = velo;
} else {
Vector2 velo = rigidbody2D.velocity;
if (velo.x < 0.4f && Time.time > pushtime)
pushed = false;
}
if (Input.GetKey (KeyCode.UpArrow)){
if (canJump == true){
rigidbody2D.velocity = jumpVector;
canJump = false;
}
}
if (Input.GetKeyDown ("RightArrow") && facingLeft) {
transform.Rotate (Vector3.up * 180);
facingLeft = false;
}
if (Input.GetKeyDown ("LeftArrow") && !facingLeft) {
transform.Rotate (Vector3.up * 180);
facingLeft = true;
}
transform.eulerAngles = new Vector3 (transform.eulerAngles.x, transform.eulerAngles.y,0);
}
void OnCollisionEnter2D(Collision2D col){
if (col.collider.tag == "ground")
canJump = true;
else if(col.collider.tag == "Player")
canJump = true;
}
public void Pushed(){
pushed = true;
pushtime = Time.time + 0.5f;
}
}

+ 8
- 0
PinataSmackdown_unity/Assets/PlayerControler.cs.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2f110149822ba46b39723c6d01336581
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

BIN
PinataSmackdown_unity/Assets/bounce.physicsMaterial2D View File


+ 4
- 0
PinataSmackdown_unity/Assets/bounce.physicsMaterial2D.meta View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 0b5d5cd6009d64349bcb76767e5bf374
NativeFormatImporter:
userData:

BIN
PinataSmackdown_unity/Assets/bullet.prefab View File


+ 4
- 0
PinataSmackdown_unity/Assets/bullet.prefab.meta View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: ebb0d5e70fdd4442f970c56d96d1458a
NativeFormatImporter:
userData:

+ 15
- 0
PinataSmackdown_unity/Assets/bulletScript.cs View File

@ -0,0 +1,15 @@
using UnityEngine;
using System.Collections;
public class bulletScript : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}

+ 8
- 0
PinataSmackdown_unity/Assets/bulletScript.cs.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 23f72220ec483487aa9bf941388b45e7
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

+ 13
- 0
PinataSmackdown_unity/Assets/camera_controls.cs View File

@ -0,0 +1,13 @@
using UnityEngine;
using System.Collections;
public class camera_controls : MonoBehaviour {
public Transform target;
// Update is called once per frame
void Update () {
transform.LookAt (target);
}
}

+ 8
- 0
PinataSmackdown_unity/Assets/camera_controls.cs.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 045a6233a4cf68244bcbd915a1ce4eb0
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

BIN
PinataSmackdown_unity/Assets/floating_platform_02.mb View File


+ 105
- 0
PinataSmackdown_unity/Assets/floating_platform_02.mb.meta View File

@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: 46d43006d4940ab48a54b4aff194420e
ModelImporter:
serializedVersion: 16
fileIDToRecycleName:
100000: //RootNode
100002: pCube1
100004: pCylinder1
100006: polySurface2
100008: polySurface3
100010: polySurface4
100012: polySurface5
100014: polySurface6
100016: polySurface7
100018: polySurface8
100020: polySurface9
100022: transform1
100024: transform2
100026: transform3
100028: transform4
100030: transform5
100032: transform6
100034: transform7
400000: //RootNode
400002: pCube1
400004: pCylinder1
400006: polySurface2
400008: polySurface3
400010: polySurface4
400012: polySurface5
400014: polySurface6
400016: polySurface7
400018: polySurface8
400020: polySurface9
400022: transform1
400024: transform2
400026: transform3
400028: transform4
400030: transform5
400032: transform6
400034: transform7
2300000: pCylinder1
2300002: polySurface8
2300004: polySurface9
3300000: pCylinder1
3300002: polySurface8
3300004: polySurface9
4300000: polySurface8
4300002: polySurface9
4300004: pCylinder1
9500000: //RootNode
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
optimizeGameObjects: 0
motionNodeName:
animationCompression: 1
animationRotationError: .5
animationPositionError: .5
animationScaleError: .5
animationWrapMode: 0
extraExposedTransformPaths: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
importBlendShapes: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
weldVertices: 1
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
tangentSpace:
normalSmoothAngle: 60
splitTangentsAcrossUV: 1
normalImportMode: 0
tangentImportMode: 1
importAnimation: 1
copyAvatar: 0
humanDescription:
human: []
skeleton: []
armTwist: .5
foreArmTwist: .5
upperLegTwist: .5
legTwist: .5
armStretch: .0500000007
legStretch: .0500000007
feetSpacing: 0
rootMotionBoneName:
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 2
additionalBone: 0
userData:

BIN
PinataSmackdown_unity/Assets/pillar_obj.fbx View File


+ 83
- 0
PinataSmackdown_unity/Assets/pillar_obj.fbx.meta View File

@ -0,0 +1,83 @@
fileFormatVersion: 2
guid: c5c501b1516413f4d916ad0a9aa39dee
ModelImporter:
serializedVersion: 16
fileIDToRecycleName:
100000: pCube1
100002: pCube2
100004: //RootNode
100006: polySurface1
100008: polySurface2
100010: polySurface3
100012: transform1
100014: transform2
100016: transform3
100018: transform4
400000: pCube1
400002: pCube2
400004: //RootNode
400006: polySurface1
400008: polySurface2
400010: polySurface3
400012: transform1
400014: transform2
400016: transform3
400018: transform4
2300000: polySurface3
3300000: polySurface3
4300000: polySurface3
9500000: //RootNode
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
optimizeGameObjects: 0
motionNodeName:
animationCompression: 1
animationRotationError: .5
animationPositionError: .5
animationScaleError: .5
animationWrapMode: 0
extraExposedTransformPaths: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: .00999999978
meshCompression: 0
addColliders: 0
importBlendShapes: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
weldVertices: 1
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
tangentSpace:
normalSmoothAngle: 60
splitTangentsAcrossUV: 1
normalImportMode: 0
tangentImportMode: 1
importAnimation: 1
copyAvatar: 0
humanDescription:
human: []
skeleton: []
armTwist: .5
foreArmTwist: .5
upperLegTwist: .5
legTwist: .5
armStretch: .0500000007
legStretch: .0500000007
feetSpacing: 0
rootMotionBoneName:
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 2
additionalBone: 0
userData:

BIN
PinataSmackdown_unity/Assets/pillar_unrapped.jpg View File

Before After
Width: 1500  |  Height: 1500  |  Size: 2.0 MiB

+ 47
- 0
PinataSmackdown_unity/Assets/pillar_unrapped.jpg.meta View File

@ -0,0 +1,47 @@
fileFormatVersion: 2
guid: f37370ad476d899488b6ffff02c320a0
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
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

BIN
PinataSmackdown_unity/Assets/platform_texture.jpg View File

Before After
Width: 1500  |  Height: 1500  |  Size: 1.7 MiB

+ 47
- 0
PinataSmackdown_unity/Assets/platform_texture.jpg.meta View File

@ -0,0 +1,47 @@
fileFormatVersion: 2
guid: 8126159699ad4be41b6ec1224406e340
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
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

+ 62
- 0
PinataSmackdown_unity/Assets/player2_controls.cs View File

@ -0,0 +1,62 @@
using UnityEngine;
using System.Collections;
public class player2_controls : MonoBehaviour {
void Start () {
}
bool pushed = false;
public float speed;
public Vector2 jumpVector;
public GameObject bullet;
bool canJump = true;
bool facingRight = true;
float currentSpeed;
float pushtime;
void Update() {
if (!pushed) {
Vector2 velo = rigidbody2D.velocity;
velo.x = (Input.GetAxis ("Horizontal_P2") * speed);
rigidbody2D.velocity = velo;
} else {
Vector2 velo = rigidbody2D.velocity;
if (velo.x < 0.4f && Time.time > pushtime)
pushed = false;
}
if (Input.GetKey (KeyCode.W)){
if (canJump == true){
rigidbody2D.velocity = jumpVector;
canJump = false;
}
}
if (Input.GetKeyDown ("a") && facingRight) {
transform.Rotate (Vector3.up * 180);
facingRight = false;
}
if (Input.GetKeyDown ("d") && !facingRight) {
transform.Rotate (Vector3.up * 180);
facingRight = true;
}
transform.eulerAngles = new Vector3 (transform.eulerAngles.x, transform.eulerAngles.y,0);
}
void OnCollisionEnter2D(Collision2D col){
if (col.collider.tag == "ground")
canJump = true;
else if(col.collider.tag == "Player")
canJump = true;
}
public void Pushed(){
pushed = true;
pushtime = Time.time + 0.5f;
}
}

+ 8
- 0
PinataSmackdown_unity/Assets/player2_controls.cs.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e1ccee01ee999524e8c0e99f0e5ac3d8
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

+ 16
- 0
PinataSmackdown_unity/Assets/sc.cs View File

@ -0,0 +1,16 @@
using UnityEngine;
using System.Collections;
public class sc : MonoBehaviour {
Quaternion rotation;
// Use this for initialization
void Awake () {
rotation = transform.rotation;
}
// Update is called once per frame
void LateUpdate () {
transform.rotation = rotation;
}
}

+ 8
- 0
PinataSmackdown_unity/Assets/sc.cs.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8664bb421145d654e8a7367a64b7ca5e
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

BIN
PinataSmackdown_unity/ProjectSettings/AudioManager.asset View File


BIN
PinataSmackdown_unity/ProjectSettings/DynamicsManager.asset View File


BIN
PinataSmackdown_unity/ProjectSettings/EditorBuildSettings.asset View File


BIN
PinataSmackdown_unity/ProjectSettings/EditorSettings.asset View File


BIN
PinataSmackdown_unity/ProjectSettings/GraphicsSettings.asset View File


BIN
PinataSmackdown_unity/ProjectSettings/InputManager.asset View File


BIN
PinataSmackdown_unity/ProjectSettings/NavMeshLayers.asset View File


BIN
PinataSmackdown_unity/ProjectSettings/NetworkManager.asset View File


BIN
PinataSmackdown_unity/ProjectSettings/Physics2DSettings.asset View File


BIN
PinataSmackdown_unity/ProjectSettings/ProjectSettings.asset View File


BIN
PinataSmackdown_unity/ProjectSettings/QualitySettings.asset View File


BIN
PinataSmackdown_unity/ProjectSettings/TagManager.asset View File


BIN
PinataSmackdown_unity/ProjectSettings/TimeManager.asset View File


Loading…
Cancel
Save