Browse Source

Major pushes, still need to fix hiding zones

master
Joshua Reason 8 years ago
parent
commit
20ab8d13d1
13 changed files with 205 additions and 2 deletions
  1. BIN
      IronToad_UnityProject/Assets/Art/Models/Materials/textures/shadows.png
  2. +118
    -0
      IronToad_UnityProject/Assets/Art/Models/Materials/textures/shadows.png.meta
  3. BIN
      IronToad_UnityProject/Assets/Art/particle effects/shadow-fog-mat.mat
  4. +8
    -0
      IronToad_UnityProject/Assets/Art/particle effects/shadow-fog-mat.mat.meta
  5. BIN
      IronToad_UnityProject/Assets/Prefabs/shadow-sprite-1.prefab
  6. +8
    -0
      IronToad_UnityProject/Assets/Prefabs/shadow-sprite-1.prefab.meta
  7. +2
    -1
      IronToad_UnityProject/Assets/Scripts/BoatController.cs
  8. +29
    -0
      IronToad_UnityProject/Assets/Scripts/HidingSpot.cs
  9. +12
    -0
      IronToad_UnityProject/Assets/Scripts/HidingSpot.cs.meta
  10. +25
    -0
      IronToad_UnityProject/Assets/Scripts/PlayerController.cs
  11. +3
    -1
      IronToad_UnityProject/Assets/Scripts/Searchlight.cs
  12. BIN
      IronToad_UnityProject/Assets/_Scenes/GreyBox_Prototype.unity
  13. BIN
      IronToad_UnityProject/ProjectSettings/QualitySettings.asset

BIN
IronToad_UnityProject/Assets/Art/Models/Materials/textures/shadows.png View File

Before After
Width: 512  |  Height: 512  |  Size: 268 KiB

+ 118
- 0
IronToad_UnityProject/Assets/Art/Models/Materials/textures/shadows.png.meta View File

@ -0,0 +1,118 @@
fileFormatVersion: 2
guid: 11a03cf810b734d53aaf004e9813f384
timeCreated: 1485053643
licenseType: Pro
TextureImporter:
fileIDToRecycleName:
21300000: shadows_0
21300002: shadows_1
21300004: shadows_2
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
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
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: Standalone
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: shadows_0
rect:
serializedVersion: 2
x: 21
y: 243
width: 477
height: 260
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
tessellationDetail: 0
- serializedVersion: 2
name: shadows_1
rect:
serializedVersion: 2
x: 241
y: 0
width: 262
height: 262
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
tessellationDetail: 0
- serializedVersion: 2
name: shadows_2
rect:
serializedVersion: 2
x: 48
y: 15
width: 148
height: 226
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
tessellationDetail: 0
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

BIN
IronToad_UnityProject/Assets/Art/particle effects/shadow-fog-mat.mat View File


+ 8
- 0
IronToad_UnityProject/Assets/Art/particle effects/shadow-fog-mat.mat.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ca5d73253182e408ca7ed18a9f88c137
timeCreated: 1485000941
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

BIN
IronToad_UnityProject/Assets/Prefabs/shadow-sprite-1.prefab View File


+ 8
- 0
IronToad_UnityProject/Assets/Prefabs/shadow-sprite-1.prefab.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4d7604cf4d94343189f9ca8fa401a92b
timeCreated: 1485054847
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

+ 2
- 1
IronToad_UnityProject/Assets/Scripts/BoatController.cs View File

@ -12,6 +12,7 @@ public class BoatController : BuoyantObject {
private bool applyBreak = true;
// Use this for initialization
void Start() {
@ -40,7 +41,7 @@ public class BoatController : BuoyantObject {
Debug.Log("Forward hit:" + forwardHitSpeed);
if (forwardHitSpeed > breakSpeed) {
NotificationServer.notify("show GameOverPanel");
PlayerController.instance.takeOneDamage();
}
}
}

+ 29
- 0
IronToad_UnityProject/Assets/Scripts/HidingSpot.cs View File

@ -0,0 +1,29 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(BoxCollider))]
public class HidingSpot : MonoBehaviour {
// Use this for initialization
void Start() {
GetComponent<BoxCollider>().isTrigger = true;
}
// Update is called once per frame
void Update() {
}
void OnTriggerEnter(Collider other) {
if (other.gameObject.CompareTag("Player"))
Searchlight.playerHidden = true;
}
void OnTriggerExit(Collider other) {
if (other.gameObject.CompareTag("Player"))
Searchlight.playerHidden = false;
}
}

+ 12
- 0
IronToad_UnityProject/Assets/Scripts/HidingSpot.cs.meta View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 0a8ee24f913b2504385604346da773d7
timeCreated: 1485054757
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

+ 25
- 0
IronToad_UnityProject/Assets/Scripts/PlayerController.cs View File

@ -12,11 +12,19 @@ public class PlayerController : MonoBehaviour {
public GameObject waveRing;
public int life = 3;
public float lastDamageTime = 0;
public static PlayerController instance;
public GameObject[] lifeHearts;
void Start() {
NotificationServer.register("show GameUI", showGameUI);
NotificationServer.register("hide GameUI", hideGameUI);
instance = this;
}
@ -48,6 +56,23 @@ public class PlayerController : MonoBehaviour {
}
public void setLife(int life) {
for (int i = 0; i < lifeHearts.Length; i++) {
lifeHearts[i].SetActive((i < life));
}
this.life = life;
}
public void takeOneDamage() {
if (Time.time > lastDamageTime + 2 && life > 0) {
setLife(life - 1);
lastDamageTime = Time.time;
if (life == 0)
NotificationServer.notify("show GameOverPanel");
}
}
private void showGameUI() {
Debug.Log("UI open");
isLocked = false;

+ 3
- 1
IronToad_UnityProject/Assets/Scripts/Searchlight.cs View File

@ -22,6 +22,8 @@ public class Searchlight : MonoBehaviour
public static SearchState state = SearchState.Spline;
public static Collider chased;
public static bool playerHidden = false;
private static List<Searchlight> instants = new List<Searchlight>();
public static bool isTriggeringAtLeastOne()
@ -62,7 +64,7 @@ public class Searchlight : MonoBehaviour
void OnTriggerExit(Collider other)
{
if (other.tag != "Player")
if (other.tag != "Player" || playerHidden)
return;
isTriggering = false;
if (state == SearchState.Chasing && !isTriggeringAtLeastOne())

BIN
IronToad_UnityProject/Assets/_Scenes/GreyBox_Prototype.unity View File


BIN
IronToad_UnityProject/ProjectSettings/QualitySettings.asset View File


Loading…
Cancel
Save