Browse Source

Fixed Level1 UI

master
Joshua Reason 9 years ago
parent
commit
5a517e7b9b
3 changed files with 818 additions and 15 deletions
  1. +65
    -0
      playable/Assets/Objects/Countdown_SmackDown.fbx.meta
  2. +742
    -0
      playable/Assets/Objects/Countdown_SmackDown_Frac.fbx.meta
  3. +11
    -15
      playable/Assets/Scripts/playerController.cs

+ 65
- 0
playable/Assets/Objects/Countdown_SmackDown.fbx.meta View File

@ -0,0 +1,65 @@
fileFormatVersion: 2
guid: 53c5098481cb29a4b8e94158a2ee0a86
ModelImporter:
serializedVersion: 16
fileIDToRecycleName:
100000: //RootNode
400000: //RootNode
2300000: //RootNode
3300000: //RootNode
4300000: Text
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:

+ 742
- 0
playable/Assets/Objects/Countdown_SmackDown_Frac.fbx.meta View File

@ -0,0 +1,742 @@
fileFormatVersion: 2
guid: 865926416ae344047b96b60615ceef44
ModelImporter:
serializedVersion: 16
fileIDToRecycleName:
100000: //RootNode
100002: Text_cell
100004: Text_cell.001
100006: Text_cell.002
100008: Text_cell.003
100010: Text_cell.004
100012: Text_cell.005
100014: Text_cell.007
100016: Text_cell.008
100018: Text_cell.009
100020: Text_cell.010
100022: Text_cell.011
100024: Text_cell.012
100026: Text_cell.013
100028: Text_cell.014
100030: Text_cell.015
100032: Text_cell.016
100034: Text_cell.017
100036: Text_cell.018
100038: Text_cell.019
100040: Text_cell.020
100042: Text_cell.021
100044: Text_cell.022
100046: Text_cell.023
100048: Text_cell.024
100050: Text_cell.025
100052: Text_cell.026
100054: Text_cell.027
100056: Text_cell.028
100058: Text_cell.029
100060: Text_cell.030
100062: Text_cell.031
100064: Text_cell.032
100066: Text_cell.033
100068: Text_cell.034
100070: Text_cell.035
100072: Text_cell.036
100074: Text_cell.037
100076: Text_cell.038
100078: Text_cell.039
100080: Text_cell.040
100082: Text_cell.041
100084: Text_cell.042
100086: Text_cell.043
100088: Text_cell.044
100090: Text_cell.045
100092: Text_cell.046
100094: Text_cell.047
100096: Text_cell.048
100098: Text_cell.049
100100: Text_cell.050
100102: Text_cell.051
100104: Text_cell.052
100106: Text_cell.053
100108: Text_cell.054
100110: Text_cell.055
100112: Text_cell.056
100114: Text_cell.057
100116: Text_cell.058
100118: Text_cell.059
100120: Text_cell.060
100122: Text_cell.061
100124: Text_cell.062
100126: Text_cell.063
100128: Text_cell.064
100130: Text_cell.065
100132: Text_cell.066
100134: Text_cell.067
100136: Text_cell.068
100138: Text_cell.069
100140: Text_cell.070
100142: Text_cell.071
100144: Text_cell.072
100146: Text_cell.073
100148: Text_cell.074
100150: Text_cell.075
100152: Text_cell.076
100154: Text_cell.077
100156: Text_cell.078
100158: Text_cell.079
100160: Text_cell.080
100162: Text_cell.081
100164: Text_cell.082
100166: Text_cell.083
100168: Text_cell.084
100170: Text_cell.085
100172: Text_cell.086
100174: Text_cell.087
100176: Text_cell.088
100178: Text_cell.089
100180: Text_cell.090
100182: Text_cell.091
100184: Text_cell.092
100186: Text_cell.093
100188: Text_cell.094
100190: Text_cell.095
100192: Text_cell.096
100194: Text_cell.097
100196: Text_cell.098
100198: Text_cell.099
100200: Text_cell.100
100202: Text_cell.101
100204: Text_cell.102
100206: Text_cell.103
100208: Text_cell.104
100210: Text_cell.105
100212: Text_cell.106
100214: Text_cell.107
100216: Text_cell.108
100218: Text_cell.109
100220: Text_cell.110
100222: Text_cell.111
100224: Text_cell.112
100226: Text_cell.113
100228: Text_cell.114
100230: Text_cell.115
100232: Text_cell.116
100234: Text_cell.117
100236: Text_cell.118
100238: Text_cell.119
100240: Text_cell.120
100242: Text_cell.121
100244: Text_cell.122
100246: Text_cell.123
100248: Text_cell.124
100250: Text_cell.125
100252: Text_cell.126
100254: Text_cell.127
100256: Text_cell.128
100258: Text_cell.129
100260: Text_cell.130
100262: Text_cell.131
100264: Text_cell.132
100266: Text_cell.133
100268: Text_cell.134
100270: Text_cell.135
100272: Text_cell.136
100274: Text_cell.137
400000: //RootNode
400002: Text_cell
400004: Text_cell.001
400006: Text_cell.002
400008: Text_cell.003
400010: Text_cell.004
400012: Text_cell.005
400014: Text_cell.007
400016: Text_cell.008
400018: Text_cell.009
400020: Text_cell.010
400022: Text_cell.011
400024: Text_cell.012
400026: Text_cell.013
400028: Text_cell.014
400030: Text_cell.015
400032: Text_cell.016
400034: Text_cell.017
400036: Text_cell.018
400038: Text_cell.019
400040: Text_cell.020
400042: Text_cell.021
400044: Text_cell.022
400046: Text_cell.023
400048: Text_cell.024
400050: Text_cell.025
400052: Text_cell.026
400054: Text_cell.027
400056: Text_cell.028
400058: Text_cell.029
400060: Text_cell.030
400062: Text_cell.031
400064: Text_cell.032
400066: Text_cell.033
400068: Text_cell.034
400070: Text_cell.035
400072: Text_cell.036
400074: Text_cell.037
400076: Text_cell.038
400078: Text_cell.039
400080: Text_cell.040
400082: Text_cell.041
400084: Text_cell.042
400086: Text_cell.043
400088: Text_cell.044
400090: Text_cell.045
400092: Text_cell.046
400094: Text_cell.047
400096: Text_cell.048
400098: Text_cell.049
400100: Text_cell.050
400102: Text_cell.051
400104: Text_cell.052
400106: Text_cell.053
400108: Text_cell.054
400110: Text_cell.055
400112: Text_cell.056
400114: Text_cell.057
400116: Text_cell.058
400118: Text_cell.059
400120: Text_cell.060
400122: Text_cell.061
400124: Text_cell.062
400126: Text_cell.063
400128: Text_cell.064
400130: Text_cell.065
400132: Text_cell.066
400134: Text_cell.067
400136: Text_cell.068
400138: Text_cell.069
400140: Text_cell.070
400142: Text_cell.071
400144: Text_cell.072
400146: Text_cell.073
400148: Text_cell.074
400150: Text_cell.075
400152: Text_cell.076
400154: Text_cell.077
400156: Text_cell.078
400158: Text_cell.079
400160: Text_cell.080
400162: Text_cell.081
400164: Text_cell.082
400166: Text_cell.083
400168: Text_cell.084
400170: Text_cell.085
400172: Text_cell.086
400174: Text_cell.087
400176: Text_cell.088
400178: Text_cell.089
400180: Text_cell.090
400182: Text_cell.091
400184: Text_cell.092
400186: Text_cell.093
400188: Text_cell.094
400190: Text_cell.095
400192: Text_cell.096
400194: Text_cell.097
400196: Text_cell.098
400198: Text_cell.099
400200: Text_cell.100
400202: Text_cell.101
400204: Text_cell.102
400206: Text_cell.103
400208: Text_cell.104
400210: Text_cell.105
400212: Text_cell.106
400214: Text_cell.107
400216: Text_cell.108
400218: Text_cell.109
400220: Text_cell.110
400222: Text_cell.111
400224: Text_cell.112
400226: Text_cell.113
400228: Text_cell.114
400230: Text_cell.115
400232: Text_cell.116
400234: Text_cell.117
400236: Text_cell.118
400238: Text_cell.119
400240: Text_cell.120
400242: Text_cell.121
400244: Text_cell.122
400246: Text_cell.123
400248: Text_cell.124
400250: Text_cell.125
400252: Text_cell.126
400254: Text_cell.127
400256: Text_cell.128
400258: Text_cell.129
400260: Text_cell.130
400262: Text_cell.131
400264: Text_cell.132
400266: Text_cell.133
400268: Text_cell.134
400270: Text_cell.135
400272: Text_cell.136
400274: Text_cell.137
2300000: Text_cell
2300002: Text_cell.001
2300004: Text_cell.002
2300006: Text_cell.003
2300008: Text_cell.004
2300010: Text_cell.005
2300012: Text_cell.007
2300014: Text_cell.008
2300016: Text_cell.009
2300018: Text_cell.010
2300020: Text_cell.011
2300022: Text_cell.012
2300024: Text_cell.013
2300026: Text_cell.014
2300028: Text_cell.015
2300030: Text_cell.016
2300032: Text_cell.017
2300034: Text_cell.018
2300036: Text_cell.019
2300038: Text_cell.020
2300040: Text_cell.021
2300042: Text_cell.022
2300044: Text_cell.023
2300046: Text_cell.024
2300048: Text_cell.025
2300050: Text_cell.026
2300052: Text_cell.027
2300054: Text_cell.028
2300056: Text_cell.029
2300058: Text_cell.030
2300060: Text_cell.031
2300062: Text_cell.032
2300064: Text_cell.033
2300066: Text_cell.034
2300068: Text_cell.035
2300070: Text_cell.036
2300072: Text_cell.037
2300074: Text_cell.038
2300076: Text_cell.039
2300078: Text_cell.040
2300080: Text_cell.041
2300082: Text_cell.042
2300084: Text_cell.043
2300086: Text_cell.044
2300088: Text_cell.045
2300090: Text_cell.046
2300092: Text_cell.047
2300094: Text_cell.048
2300096: Text_cell.049
2300098: Text_cell.050
2300100: Text_cell.051
2300102: Text_cell.052
2300104: Text_cell.053
2300106: Text_cell.054
2300108: Text_cell.055
2300110: Text_cell.056
2300112: Text_cell.057
2300114: Text_cell.058
2300116: Text_cell.059
2300118: Text_cell.060
2300120: Text_cell.061
2300122: Text_cell.062
2300124: Text_cell.063
2300126: Text_cell.064
2300128: Text_cell.065
2300130: Text_cell.066
2300132: Text_cell.067
2300134: Text_cell.068
2300136: Text_cell.069
2300138: Text_cell.070
2300140: Text_cell.071
2300142: Text_cell.072
2300144: Text_cell.073
2300146: Text_cell.074
2300148: Text_cell.075
2300150: Text_cell.076
2300152: Text_cell.077
2300154: Text_cell.078
2300156: Text_cell.079
2300158: Text_cell.080
2300160: Text_cell.081
2300162: Text_cell.082
2300164: Text_cell.083
2300166: Text_cell.084
2300168: Text_cell.085
2300170: Text_cell.086
2300172: Text_cell.087
2300174: Text_cell.088
2300176: Text_cell.089
2300178: Text_cell.090
2300180: Text_cell.091
2300182: Text_cell.092
2300184: Text_cell.093
2300186: Text_cell.094
2300188: Text_cell.095
2300190: Text_cell.096
2300192: Text_cell.097
2300194: Text_cell.098
2300196: Text_cell.099
2300198: Text_cell.100
2300200: Text_cell.101
2300202: Text_cell.102
2300204: Text_cell.103
2300206: Text_cell.104
2300208: Text_cell.105
2300210: Text_cell.106
2300212: Text_cell.107
2300214: Text_cell.108
2300216: Text_cell.109
2300218: Text_cell.110
2300220: Text_cell.111
2300222: Text_cell.112
2300224: Text_cell.113
2300226: Text_cell.114
2300228: Text_cell.115
2300230: Text_cell.116
2300232: Text_cell.117
2300234: Text_cell.118
2300236: Text_cell.119
2300238: Text_cell.120
2300240: Text_cell.121
2300242: Text_cell.122
2300244: Text_cell.123
2300246: Text_cell.124
2300248: Text_cell.125
2300250: Text_cell.126
2300252: Text_cell.127
2300254: Text_cell.128
2300256: Text_cell.129
2300258: Text_cell.130
2300260: Text_cell.131
2300262: Text_cell.132
2300264: Text_cell.133
2300266: Text_cell.134
2300268: Text_cell.135
2300270: Text_cell.136
2300272: Text_cell.137
3300000: Text_cell
3300002: Text_cell.001
3300004: Text_cell.002
3300006: Text_cell.003
3300008: Text_cell.004
3300010: Text_cell.005
3300012: Text_cell.007
3300014: Text_cell.008
3300016: Text_cell.009
3300018: Text_cell.010
3300020: Text_cell.011
3300022: Text_cell.012
3300024: Text_cell.013
3300026: Text_cell.014
3300028: Text_cell.015
3300030: Text_cell.016
3300032: Text_cell.017
3300034: Text_cell.018
3300036: Text_cell.019
3300038: Text_cell.020
3300040: Text_cell.021
3300042: Text_cell.022
3300044: Text_cell.023
3300046: Text_cell.024
3300048: Text_cell.025
3300050: Text_cell.026
3300052: Text_cell.027
3300054: Text_cell.028
3300056: Text_cell.029
3300058: Text_cell.030
3300060: Text_cell.031
3300062: Text_cell.032
3300064: Text_cell.033
3300066: Text_cell.034
3300068: Text_cell.035
3300070: Text_cell.036
3300072: Text_cell.037
3300074: Text_cell.038
3300076: Text_cell.039
3300078: Text_cell.040
3300080: Text_cell.041
3300082: Text_cell.042
3300084: Text_cell.043
3300086: Text_cell.044
3300088: Text_cell.045
3300090: Text_cell.046
3300092: Text_cell.047
3300094: Text_cell.048
3300096: Text_cell.049
3300098: Text_cell.050
3300100: Text_cell.051
3300102: Text_cell.052
3300104: Text_cell.053
3300106: Text_cell.054
3300108: Text_cell.055
3300110: Text_cell.056
3300112: Text_cell.057
3300114: Text_cell.058
3300116: Text_cell.059
3300118: Text_cell.060
3300120: Text_cell.061
3300122: Text_cell.062
3300124: Text_cell.063
3300126: Text_cell.064
3300128: Text_cell.065
3300130: Text_cell.066
3300132: Text_cell.067
3300134: Text_cell.068
3300136: Text_cell.069
3300138: Text_cell.070
3300140: Text_cell.071
3300142: Text_cell.072
3300144: Text_cell.073
3300146: Text_cell.074
3300148: Text_cell.075
3300150: Text_cell.076
3300152: Text_cell.077
3300154: Text_cell.078
3300156: Text_cell.079
3300158: Text_cell.080
3300160: Text_cell.081
3300162: Text_cell.082
3300164: Text_cell.083
3300166: Text_cell.084
3300168: Text_cell.085
3300170: Text_cell.086
3300172: Text_cell.087
3300174: Text_cell.088
3300176: Text_cell.089
3300178: Text_cell.090
3300180: Text_cell.091
3300182: Text_cell.092
3300184: Text_cell.093
3300186: Text_cell.094
3300188: Text_cell.095
3300190: Text_cell.096
3300192: Text_cell.097
3300194: Text_cell.098
3300196: Text_cell.099
3300198: Text_cell.100
3300200: Text_cell.101
3300202: Text_cell.102
3300204: Text_cell.103
3300206: Text_cell.104
3300208: Text_cell.105
3300210: Text_cell.106
3300212: Text_cell.107
3300214: Text_cell.108
3300216: Text_cell.109
3300218: Text_cell.110
3300220: Text_cell.111
3300222: Text_cell.112
3300224: Text_cell.113
3300226: Text_cell.114
3300228: Text_cell.115
3300230: Text_cell.116
3300232: Text_cell.117
3300234: Text_cell.118
3300236: Text_cell.119
3300238: Text_cell.120
3300240: Text_cell.121
3300242: Text_cell.122
3300244: Text_cell.123
3300246: Text_cell.124
3300248: Text_cell.125
3300250: Text_cell.126
3300252: Text_cell.127
3300254: Text_cell.128
3300256: Text_cell.129
3300258: Text_cell.130
3300260: Text_cell.131
3300262: Text_cell.132
3300264: Text_cell.133
3300266: Text_cell.134
3300268: Text_cell.135
3300270: Text_cell.136
3300272: Text_cell.137
4300000: Text_cell.137
4300002: Text_cell.136
4300004: Text_cell.135
4300006: Text_cell.134
4300008: Text_cell.133
4300010: Text_cell.132
4300012: Text_cell.131
4300014: Text_cell.130
4300016: Text_cell.129
4300018: Text_cell.128
4300020: Text_cell.127
4300022: Text_cell.126
4300024: Text_cell.125
4300026: Text_cell.124
4300028: Text_cell.123
4300030: Text_cell.122
4300032: Text_cell.121
4300034: Text_cell.120
4300036: Text_cell.119
4300038: Text_cell.118
4300040: Text_cell.117
4300042: Text_cell.116
4300044: Text_cell.115
4300046: Text_cell.114
4300048: Text_cell.113
4300050: Text_cell.112
4300052: Text_cell.111
4300054: Text_cell.110
4300056: Text_cell.109
4300058: Text_cell.108
4300060: Text_cell.107
4300062: Text_cell.106
4300064: Text_cell.105
4300068: Text_cell.103
4300070: Text_cell.102
4300072: Text_cell.101
4300074: Text_cell.100
4300076: Text_cell.099
4300078: Text_cell.098
4300080: Text_cell.097
4300082: Text_cell.096
4300084: Text_cell.095
4300086: Text_cell.094
4300088: Text_cell.093
4300090: Text_cell.092
4300092: Text_cell.091
4300094: Text_cell.090
4300096: Text_cell.089
4300098: Text_cell.088
4300100: Text_cell.087
4300102: Text_cell.086
4300104: Text_cell.085
4300106: Text_cell.084
4300108: Text_cell.083
4300110: Text_cell.082
4300112: Text_cell.081
4300114: Text_cell.080
4300116: Text_cell.079
4300118: Text_cell.078
4300120: Text_cell.077
4300122: Text_cell.076
4300124: Text_cell.075
4300126: Text_cell.074
4300130: Text_cell.072
4300132: Text_cell.071
4300134: Text_cell.070
4300136: Text_cell.069
4300138: Text_cell.068
4300140: Text_cell.067
4300142: Text_cell.066
4300144: Text_cell.065
4300146: Text_cell.064
4300148: Text_cell.063
4300150: Text_cell.062
4300152: Text_cell.061
4300154: Text_cell.060
4300156: Text_cell.059
4300158: Text_cell.058
4300160: Text_cell.057
4300162: Text_cell.056
4300164: Text_cell.055
4300166: Text_cell.054
4300168: Text_cell.053
4300170: Text_cell.052
4300172: Text_cell.051
4300178: Text_cell.048
4300180: Text_cell.047
4300182: Text_cell.046
4300184: Text_cell.045
4300186: Text_cell.044
4300188: Text_cell.043
4300190: Text_cell.042
4300192: Text_cell.041
4300194: Text_cell.040
4300196: Text_cell.039
4300198: Text_cell.038
4300200: Text_cell.037
4300202: Text_cell.036
4300204: Text_cell.035
4300206: Text_cell.034
4300208: Text_cell.033
4300210: Text_cell.032
4300212: Text_cell.031
4300214: Text_cell.030
4300216: Text_cell.029
4300218: Text_cell.028
4300220: Text_cell.027
4300222: Text_cell.026
4300224: Text_cell.025
4300226: Text_cell.024
4300228: Text_cell.023
4300230: Text_cell.022
4300232: Text_cell.021
4300234: Text_cell.020
4300236: Text_cell.019
4300238: Text_cell.018
4300240: Text_cell.017
4300242: Text_cell.016
4300244: Text_cell.015
4300246: Text_cell.014
4300248: Text_cell.013
4300252: Text_cell.011
4300254: Text_cell.010
4300256: Text_cell.009
4300258: Text_cell.008
4300260: Text_cell.007
4300262: Text_cell.005
4300264: Text_cell.004
4300266: Text_cell.003
4300268: Text_cell.002
4300270: Text_cell.001
4300272: Text_cell
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:

+ 11
- 15
playable/Assets/Scripts/playerController.cs View File

@ -19,7 +19,11 @@ public class playerController : MonoBehaviour {
public GUIText gameOverDisplay; public GUIText gameOverDisplay;
public GameObject dashDisplay; public GameObject dashDisplay;
public GameObject playerFrac; public GameObject playerFrac;
public GameObject[] hearts;
//public GameObject heart2;
//public GameObject heart3;
public float runSpeed; //run speed public float runSpeed; //run speed
public float jumpHeight; //jump height public float jumpHeight; //jump height
public float health; //holds health public float health; //holds health
@ -46,7 +50,7 @@ public class playerController : MonoBehaviour {
private float curDirection = -1; //direction player is pointing private float curDirection = -1; //direction player is pointing
private bool canJump = true; // if player can jump private bool canJump = true; // if player can jump
private bool canSpin = true; // if player can spin private bool canSpin = true; // if player can spin
private List<GameObject> hearts = new List<GameObject> (); //list which holds health sprites;
//private List<GameObject> hearts = new List<GameObject> (); //list which holds health sprites;
private bool isSpinning = false; //checks if player is spin attacking private bool isSpinning = false; //checks if player is spin attacking
private float lastHit; private float lastHit;
private float lastAttack; private float lastAttack;
@ -149,23 +153,15 @@ public class playerController : MonoBehaviour {
updateHealth = true; updateHealth = true;
if (updateHealth){ if (updateHealth){
foreach (GameObject desHeart in hearts) //Destroy all heart sprites
GameObject.Destroy (desHeart);
hearts.Clear(); //sets list to zero
foreach (GameObject heart in hearts) //Destroy all heart sprites
heart.SetActive(false); //sets list to zero
for (int i=1; i<= health; i++) { //creates new heart sprite for each health
GameObject heartCanister = Instantiate (heart) as GameObject; //creat heart sprite
Vector3 heartPos = new Vector3 ();
//set position
heartPos.x = (healthPos.x + i * 0.033f);
heartPos.y = healthPos.y;
for (int i=0; i< health; i++) { //creates new heart sprite for each health
hearts[i].SetActive(true);
heartCanister.transform.position = heartPos;
hearts.Add(heartCanister); //adds heart to list
if (heartBlack == true && heartColor == false){ if (heartBlack == true && heartColor == false){
heartCanister.guiTexture.color = Color.black;
//heartCanister.guiTexture.color = Color.black;
//else (heartCanister.guiTexture.color = Color.red); //else (heartCanister.guiTexture.color = Color.red);
} }

Loading…
Cancel
Save