Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
b316b6b
Testing git/slack integration
gitdev481 Feb 21, 2016
0447eac
Timer has been re done to be super simple with the correct format of …
NiceNChrispy Feb 21, 2016
5b7eb93
Merge branch 'master' of https://github.com/GREEDYHD/ShellShock
NiceNChrispy Feb 21, 2016
37b80b7
Re did timer so now it is super simple and in the correct format of 0…
NiceNChrispy Feb 21, 2016
7f8b0ec
Testing Slack integration
GREEDYHD Feb 22, 2016
38b11cb
Testing Github/Slack Integration v2
gitdev481 Feb 22, 2016
0cf763b
New PlayerHUD Prototype
gitdev481 Feb 23, 2016
40e9864
Holes work + 2 players in
normyp Feb 23, 2016
e7fcff5
Players now collide properly with holes
normyp Feb 23, 2016
741a24a
Allowed sprite swapping for multiple players
gitdev481 Feb 23, 2016
45328d5
Revert "Allowed sprite swapping for multiple players"
gitdev481 Feb 23, 2016
3f33b6c
Re-attempting previous commit due to Scene conflict
gitdev481 Feb 23, 2016
be8aac7
Increased the size of the player's hitbox
gitdev481 Feb 23, 2016
be6e859
Added in a basic walled arena
gitdev481 Feb 24, 2016
60299eb
HUD now hidden by default, use back button to enable
gitdev481 Feb 24, 2016
686f85d
Added in Giorgio's code from 24/02/
gitdev481 Feb 26, 2016
97ab591
Altered timer format
GREEDYHD Feb 28, 2016
d77f1e3
Added in projectile ID so that players know who shot them.
GREEDYHD Feb 28, 2016
3ae6d9c
Fixed UI sliders. Added in a better slider image. Health now affects the
GREEDYHD Feb 28, 2016
a8a1ba9
Put in the multi directional half blocks (Need to sort out colliders …
NiceNChrispy Feb 28, 2016
b9f8e33
Players now collide with the tunnels.
normyp Feb 28, 2016
83866c1
Disabled old playerHUDs from the oldHUD.
gitdev481 Mar 1, 2016
d85d64b
Players can now die
gitdev481 Mar 1, 2016
41fcd36
Cleaned up game object hierarchy and put the timer script on the timer
gitdev481 Mar 1, 2016
eefda23
Stat Tracker attached to player.
normyp Mar 1, 2016
f87859b
Merge branch 'master' of https://github.com/GREEDYHD/ShellShock
normyp Mar 1, 2016
e7a20cb
Players can now respawn after dying.
gitdev481 Mar 1, 2016
187456c
Merge remote-tracking branch 'origin/master'
gitdev481 Mar 1, 2016
9940a61
Fixed reticle disabling/enabling during player respawn
gitdev481 Mar 1, 2016
5640bf1
Package
normyp Mar 1, 2016
66df8d7
Hopefully fixed the conflicts
normyp Mar 1, 2016
d8ee66b
Revert "Hopefully fixed the conflicts"
gitdev481 Mar 1, 2016
8df22b0
Revert "Package"
gitdev481 Mar 1, 2016
81f5168
Fixed Player 2's pistol, and the resetting of ammo and HP sliders
gitdev481 Mar 1, 2016
c55090d
Revert "Revert "Hopefully fixed the conflicts""
gitdev481 Mar 1, 2016
d94d97d
Revert "Revert "Package""
gitdev481 Mar 1, 2016
df2273d
Player 1's ammo count and slider now positioned correctly. Also re-re…
gitdev481 Mar 1, 2016
d02fab5
Players can now score points (work in progress)
gitdev481 Mar 2, 2016
c6066d7
Player's default weapon is now pistol with infinite ammo
gitdev481 Mar 2, 2016
47a13fe
Players now get -1 for a suicide
gitdev481 Mar 2, 2016
88e78e3
Helicopter now has its own sorting layer, disabled ammo count text
gitdev481 Mar 2, 2016
f7c68f8
Grenade damage
GiorgioBufa Mar 2, 2016
60034e1
Added ShellShock namespace to every script and set up namespaces corr…
gitdev481 Mar 2, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
181 changes: 92 additions & 89 deletions Assets/Editor/PolygonalColliderMan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,106 +2,109 @@
using System.Collections;
using UnityEditor;

//is a custom editor for whatever object has a polygoncollider2d attached
[CustomEditor(typeof(PolygonCollider2D))]
public class PolygonColliderMan : Editor
{
namespace ShellShock
{
//is a custom editor for whatever object has a polygoncollider2d attached
[CustomEditor(typeof(PolygonCollider2D))]
public class PolygonColliderMan : Editor
{

private bool PolygonColliderManual;
private bool[] NewColliders = new bool[0];
private Vector2[][] Polygons;
private bool PolygonColliderManual;
private bool[] NewColliders = new bool[0];
private Vector2[][] Polygons;

public override void OnInspectorGUI()
{
PolygonCollider2D collider = (PolygonCollider2D)target;
public override void OnInspectorGUI()
{
PolygonCollider2D collider = (PolygonCollider2D)target;

DrawDefaultInspector();
//modify the layout with a new polygoncollidermanual section
PolygonColliderManual = EditorGUILayout.Foldout(PolygonColliderManual, "PolygonColliderManual");
DrawDefaultInspector();
//modify the layout with a new polygoncollidermanual section
PolygonColliderManual = EditorGUILayout.Foldout(PolygonColliderManual, "PolygonColliderManual");

if (PolygonColliderManual)
{
Polygons = new Vector2[collider.pathCount][];
for (int i = 0; i < collider.pathCount; i++)
{
Vector2[] path = collider.GetPath(i);
Polygons[i] = path;
}
if (PolygonColliderManual)
{
Polygons = new Vector2[collider.pathCount][];
for (int i = 0; i < collider.pathCount; i++)
{
Vector2[] path = collider.GetPath(i);
Polygons[i] = path;
}

int size = EditorGUILayout.IntField("Size", Polygons.Length);
int size = EditorGUILayout.IntField("Size", Polygons.Length);


if (NewColliders.Length != Polygons.Length)
{
bool[] ArrNewColliders = new bool[Polygons.Length];
if (NewColliders.Length != Polygons.Length)
{
bool[] ArrNewColliders = new bool[Polygons.Length];

for (int i = 0; i < ArrNewColliders.Length; i++)
{
if (NewColliders.Length > i)
ArrNewColliders[i] = NewColliders[i];
else
ArrNewColliders[i] = false;
}
for (int i = 0; i < ArrNewColliders.Length; i++)
{
if (NewColliders.Length > i)
ArrNewColliders[i] = NewColliders[i];
else
ArrNewColliders[i] = false;
}

NewColliders = ArrNewColliders;
}
NewColliders = ArrNewColliders;
}

if (size != Polygons.Length)
{
Vector2[][] newPaths = new Vector2[size][];
for (int i = 0; i < size; i++)
{
if (Polygons.Length > i)
{
newPaths[i] = Polygons[i];
}
else
{
newPaths[i] = new Vector2[0];
}
}
Polygons = newPaths;
}
if (size != Polygons.Length)
{
Vector2[][] newPaths = new Vector2[size][];
for (int i = 0; i < size; i++)
{
if (Polygons.Length > i)
{
newPaths[i] = Polygons[i];
}
else
{
newPaths[i] = new Vector2[0];
}
}
Polygons = newPaths;
}

EditorGUI.indentLevel++;
for (int i = 0; i < size; i++)
{
NewColliders[i] = EditorGUILayout.Foldout(NewColliders[i], string.Concat("Path ", i));
EditorGUI.indentLevel++;
for (int i = 0; i < size; i++)
{
NewColliders[i] = EditorGUILayout.Foldout(NewColliders[i], string.Concat("Path ", i));

if (NewColliders[i])
{
Vector2[] path = Polygons[i];
int pathSize = EditorGUILayout.IntField("Size", path.Length);
if (pathSize != path.Length)
{
Vector2[] newPath = new Vector2[pathSize];
for (int j = 0; j < pathSize; j++)
{
if (path.Length > j)
{
newPath[j] = path[j];
}
else
{
newPath[j] = new Vector2();
}
}
Polygons[i] = newPath;
}
if (NewColliders[i])
{
Vector2[] path = Polygons[i];
int pathSize = EditorGUILayout.IntField("Size", path.Length);
if (pathSize != path.Length)
{
Vector2[] newPath = new Vector2[pathSize];
for (int j = 0; j < pathSize; j++)
{
if (path.Length > j)
{
newPath[j] = path[j];
}
else
{
newPath[j] = new Vector2();
}
}
Polygons[i] = newPath;
}

for (int j = 0; j < pathSize; j++)
{
Polygons[i][j] = EditorGUILayout.Vector2Field(string.Concat("Point ", j), Polygons[i][j]);
}
}
}
EditorGUI.indentLevel--;
for (int j = 0; j < pathSize; j++)
{
Polygons[i][j] = EditorGUILayout.Vector2Field(string.Concat("Point ", j), Polygons[i][j]);
}
}
}
EditorGUI.indentLevel--;

collider.pathCount = Polygons.Length;
for (int i = 0; i < Polygons.Length; i++)
{
collider.SetPath(i, Polygons[i]);
}
}
}
}
collider.pathCount = Polygons.Length;
for (int i = 0; i < Polygons.Length; i++)
{
collider.SetPath(i, Polygons[i]);
}
}
}
}
}
46 changes: 0 additions & 46 deletions Assets/MovementISO.cs

This file was deleted.

53 changes: 53 additions & 0 deletions Assets/Prefabs/Acolade Manager.prefab
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &104076
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 472770}
- 114: {fileID: 11434298}
m_Layer: 0
m_Name: Acolade Manager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &472770
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 104076}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -.124886155, y: .0156106949, z: -.00819587708}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!114 &11434298
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 104076}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3da60e80b5f08a84bbeefea68eef36db, type: 3}
m_Name:
m_EditorClassIdentifier:
statTrackers: []
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 104076}
m_IsPrefabParent: 1
8 changes: 8 additions & 0 deletions Assets/Prefabs/Acolade Manager.prefab.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/Prefabs/Level Blocks.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading