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