Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
e59b459fcc | |||
0d29f26300 | |||
21a50f9d03 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,6 +4,8 @@
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
project/Terkoiz.MapZoneHighlighter/key.snk
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ZoneHighlighter",
|
||||
"author": "Terkoiz",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"license": "NCSA Open Source",
|
||||
"dependencies": {}
|
||||
}
|
@ -52,6 +52,11 @@ namespace Terkoiz.MapZoneHighlighter.BoundedBoxes
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if (Camera.main == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ScreenPosition = UIDrawingUtil.WorldPointToScreenPoint(transform.position);
|
||||
IsOnScreen = UIDrawingUtil.IsScreenPointVisible(ScreenPosition);
|
||||
DistanceToCamera = Vector3.Distance(Camera.main.transform.position, transform.position);
|
||||
|
@ -30,13 +30,10 @@ namespace Terkoiz.MapZoneHighlighter
|
||||
return;
|
||||
}
|
||||
|
||||
if (_mainCamera != null)
|
||||
{
|
||||
if (_mainCamera.gameObject.GetComponent<ColliderBoundsRenderer>() == null)
|
||||
if (_mainCamera != null && _mainCamera.gameObject.GetComponent<ColliderBoundsRenderer>() == null)
|
||||
{
|
||||
_mainCamera.gameObject.AddComponent<ColliderBoundsRenderer>();
|
||||
}
|
||||
}
|
||||
|
||||
_boundsControllers = new List<ColliderBoundsController>();
|
||||
foreach (var mapZone in FindObjectsOfType<EFT.Interactive.TriggerWithId>().Select(x => x.gameObject).ToList())
|
||||
@ -44,8 +41,9 @@ namespace Terkoiz.MapZoneHighlighter
|
||||
if (mapZone.GetComponent<ColliderBoundsController>() == null)
|
||||
{
|
||||
mapZone.AddComponent<ColliderBoundsController>();
|
||||
_boundsControllers.Add(mapZone.GetComponent<ColliderBoundsController>());
|
||||
}
|
||||
|
||||
_boundsControllers.Add(mapZone.GetComponent<ColliderBoundsController>());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,12 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>..\Shared\References\Assembly-CSharp.dll</HintPath>
|
||||
@ -81,6 +87,8 @@
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<None Include="key.snk" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
Loading…
x
Reference in New Issue
Block a user