Skip to content

Commit

Permalink
(Hopefully) final update before release
Browse files Browse the repository at this point in the history
  • Loading branch information
rudderbucky committed Jan 11, 2019
1 parent 3aace46 commit a6bca4d
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: f7d7e5869cbeb124cb1b9b13d1ff34ec, type: 3}
m_Name: Carrier
m_EditorClassIdentifier:
coreSpriteID: core3_light
coreSpriteID: core1_light
coreShellSpriteID: core3_shell
intendedType: 8
parts:
Expand Down

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

2 changes: 2 additions & 0 deletions Assets/DefaultResources.asset
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,5 @@ MonoBehaviour:
obj: {fileID: 11400000, guid: b58b72d927d0c1a4995b6d7239d6315d, type: 2}
- ID: missile_station_part
obj: {fileID: 11400000, guid: 348c85c3551bade4aa8133dd50525626, type: 2}
- ID: material_color_swap
obj: {fileID: 2100000, guid: 11db0898634b08349860cff50279a55b, type: 2}
14 changes: 2 additions & 12 deletions Assets/Scenes/SampleScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,8 @@ MonoBehaviour:
obj: {fileID: 11400000, guid: b58b72d927d0c1a4995b6d7239d6315d, type: 2}
- ID: missile_station_part
obj: {fileID: 11400000, guid: 348c85c3551bade4aa8133dd50525626, type: 2}
- ID: material_color_swap
obj: {fileID: 2100000, guid: 11db0898634b08349860cff50279a55b, type: 2}
fieldID:
newObject: {fileID: 0}
resourcePack: {fileID: 11400000, guid: 2de67eb71a4cb87438b3393e036d1bb3, type: 2}
Expand Down Expand Up @@ -2993,25 +2995,13 @@ GameObject:
m_Component:
- component: {fileID: 2068204864}
- component: {fileID: 1878101311}
- component: {fileID: 2068204860}
m_Layer: 0
m_Name: PlayerCore
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &2068204860
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2068204859}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 086ca207494cfea4cb118cbeb62c64f6, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &2068204864
Transform:
m_ObjectHideFlags: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void SetOwner(IOwner owner)

protected override void OnDeath()
{
if(owner != null)
if(owner != null && !(owner.Equals(null)))
owner.GetUnitsCommanding().Remove(this);
base.OnDeath();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ protected virtual void BuildEntity()
{
SpriteRenderer renderer = gameObject.AddComponent<SpriteRenderer>();
renderer.material = ResourceManager.GetAsset<Material>("material_color_swap");
renderer.color = FactionColors.colors[faction];
if (blueprint)
{ // check if it contains a blueprint (it should)
if (blueprint.coreSpriteID == "" && blueprint.intendedType == EntityBlueprint.IntendedType.ShellCore)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ protected override void OnDestroy()
protected override void Start()
{
intrinsicCommandLimit = 3;
if (carrier != null && carrier.GetIsInitialized())
if ((carrier != null && !carrier.Equals(null)) && carrier.GetIsInitialized())
{
spawnPoint = carrier.GetSpawnPoint();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void SetOwner(IOwner owner)

protected override void OnDeath()
{
if(owner != null)
if(owner != null && !(owner.Equals(null)))
owner.GetUnitsCommanding().Remove(this);
base.OnDeath();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected override void Start()

protected override void OnDeath()
{
if(owner != null)
if(owner != null && !owner.Equals(null))
owner.GetUnitsCommanding().Remove(this);
base.OnDeath();
}
Expand Down
6 changes: 3 additions & 3 deletions Assets/Scripts/SFX Scripts/Colors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ public struct FactionColors
{
public static Color[] colors = new Color[]
{
new Color(0.05f, 95f, 0.05f, 0.8F),
new Color(95f, 0.05f, 0.05f, 0.8F),
new Color(0.05f, 0.05f, 95f, 0.8F),
new Color(0.05f, 0.95f, 0.05f, 0.8F),
new Color(0.95f, 0.05f, 0.05f, 0.8F),
new Color(0.05f, 0.05f, 0.95f, 0.8F),
};
}

Expand Down

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

0 comments on commit a6bca4d

Please sign in to comment.