Skip to content

Commit 3397c40

Browse files
committed
First commit
0 parents  commit 3397c40

File tree

12 files changed

+323
-0
lines changed

12 files changed

+323
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
obj
2+
bin
3+
.vs
4+
packages

Colver/Colver.csproj

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{73A59E02-B010-486B-9293-6F7838949944}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>Colver</RootNamespace>
11+
<AssemblyName>Colver</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<Deterministic>true</Deterministic>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<DebugType>pdbonly</DebugType>
27+
<Optimize>true</Optimize>
28+
<OutputPath>bin\Release\</OutputPath>
29+
<DefineConstants>TRACE</DefineConstants>
30+
<ErrorReport>prompt</ErrorReport>
31+
<WarningLevel>4</WarningLevel>
32+
</PropertyGroup>
33+
<ItemGroup>
34+
<Reference Include="System" />
35+
<Reference Include="System.Core" />
36+
<Reference Include="System.Xml.Linq" />
37+
<Reference Include="System.Data.DataSetExtensions" />
38+
<Reference Include="Microsoft.CSharp" />
39+
<Reference Include="System.Data" />
40+
<Reference Include="System.Net.Http" />
41+
<Reference Include="System.Xml" />
42+
<Reference Include="UnityEngine.CoreModule">
43+
<HintPath>C:\Program Files\Unity\Hub\Editor\2019.2.11f1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll</HintPath>
44+
</Reference>
45+
</ItemGroup>
46+
<ItemGroup>
47+
<Compile Include="Main\Transform2DExtensions.cs" />
48+
<Compile Include="Main\Vector2Extensions.cs" />
49+
<Compile Include="Properties\AssemblyInfo.cs" />
50+
</ItemGroup>
51+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
52+
</Project>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using UnityEngine;
2+
3+
namespace Colver.Main
4+
{
5+
public static class Transform2DExtension
6+
{
7+
public static void LookToPosition(this Transform trans,Vector3 target)
8+
{
9+
trans.rotation = Quaternion.LookRotation(trans.position - target, Vector3.forward);
10+
trans.eulerAngles = new Vector3(0, 0, trans.eulerAngles.z + 90.0f);
11+
}
12+
}
13+
}

Colver/Main/Vector2Extensions.cs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
using System;
2+
using UnityEngine;
3+
4+
namespace Colver.Main
5+
{
6+
/// <summary>
7+
/// Class used to create more methos to Vector2 class
8+
/// </summary>
9+
public static class Vector2Extension
10+
{
11+
/// <summary>
12+
/// Convert the current Vector2 to absolute integer Values
13+
/// </summary>
14+
/// <param name="vector2">Vector2 to to be conveted</param>
15+
/// <returns>Return a Vector 2 with positive integer number</returns>
16+
public static Vector2 ToAbsolute(this Vector2 vector2)
17+
{
18+
int x = Convert.ToInt32(Math.Abs(vector2.x));
19+
int y = Convert.ToInt32(Math.Abs(vector2.y));
20+
21+
return new Vector2(x, y);
22+
}
23+
24+
/// <summary>
25+
/// Verify if two Vector2 has the same x and the same Y
26+
/// </summary>
27+
/// <param name="vector2">The first Vector 2</param>
28+
/// <param name="obj">The second Vector 2</param>
29+
/// <returns>Returns true if the x and the y of the first and the second one are equals</returns>
30+
public static bool Equals(this Vector2 vector2, Vector2 obj) => vector2.ToAbsolute().x == obj.ToAbsolute().x && vector2.ToAbsolute().y == obj.ToAbsolute().y;
31+
32+
/// <summary>
33+
/// Verify if the first Vector is Greater than the second one
34+
/// </summary>
35+
/// <param name="vector2">First Vector2</param>
36+
/// <param name="obj">Second Vector2</param>
37+
/// <returns>Returns true if the x or the y of the first are grat than x and y of second one</returns>
38+
public static bool GreaterThan(this Vector2 vector2, Vector2 obj) => vector2.ToAbsolute().x > obj.ToAbsolute().x || vector2.ToAbsolute().y > obj.ToAbsolute().y;
39+
}
40+
41+
}

Colver/Properties/AssemblyInfo.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// As informações gerais sobre um assembly são controladas por
6+
// conjunto de atributos. Altere estes valores de atributo para modificar as informações
7+
// associada a um assembly.
8+
[assembly: AssemblyTitle("Colver")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("Colver")]
13+
[assembly: AssemblyCopyright("Copyright © 2020")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Definir ComVisible como false torna os tipos neste assembly invisíveis
18+
// para componentes COM. Caso precise acessar um tipo neste assembly de
19+
// COM, defina o atributo ComVisible como true nesse tipo.
20+
[assembly: ComVisible(false)]
21+
22+
// O GUID a seguir será destinado à ID de typelib se este projeto for exposto para COM
23+
[assembly: Guid("73a59e02-b010-486b-9293-6f7838949944")]
24+
25+
// As informações da versão de um assembly consistem nos quatro valores a seguir:
26+
//
27+
// Versão Principal
28+
// Versão Secundária
29+
// Número da Versão
30+
// Revisão
31+
//
32+
// É possível especificar todos os valores ou usar como padrão os Números de Build e da Revisão
33+
// usando o "*" como mostrado abaixo:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]

Entities/Alive/BaseEntity.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using UnityEngine;
2+
3+
namespace Entities.Alive
4+
{
5+
public class BaseEntity : MonoBehaviour
6+
{
7+
}
8+
}

Entities/Entities.csproj

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{2B74D005-D072-40B2-8C7C-CB0061C2B33C}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>Entities</RootNamespace>
11+
<AssemblyName>Entities</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<Deterministic>true</Deterministic>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<DebugType>pdbonly</DebugType>
27+
<Optimize>true</Optimize>
28+
<OutputPath>bin\Release\</OutputPath>
29+
<DefineConstants>TRACE</DefineConstants>
30+
<ErrorReport>prompt</ErrorReport>
31+
<WarningLevel>4</WarningLevel>
32+
</PropertyGroup>
33+
<ItemGroup>
34+
<Reference Include="System" />
35+
<Reference Include="System.Core" />
36+
<Reference Include="System.Xml.Linq" />
37+
<Reference Include="System.Data.DataSetExtensions" />
38+
<Reference Include="Microsoft.CSharp" />
39+
<Reference Include="System.Data" />
40+
<Reference Include="System.Net.Http" />
41+
<Reference Include="System.Xml" />
42+
<Reference Include="UnityEngine.CoreModule">
43+
<HintPath>C:\Program Files\Unity\Hub\Editor\2019.2.11f1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll</HintPath>
44+
</Reference>
45+
</ItemGroup>
46+
<ItemGroup>
47+
<Compile Include="Alive\BaseEntity.cs" />
48+
<Compile Include="Objects\Item.cs" />
49+
<Compile Include="Objects\Projectile.cs" />
50+
<Compile Include="Properties\AssemblyInfo.cs" />
51+
</ItemGroup>
52+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
53+
</Project>

Entities/Objects/Item.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace Entities.Objects
2+
{
3+
public class Item
4+
{
5+
}
6+
}

Entities/Objects/Projectile.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using UnityEngine;
2+
3+
namespace Entities.Objects
4+
{
5+
public class Projectile : MonoBehaviour
6+
{
7+
/// <summary>
8+
/// Actual time of the Projectile
9+
/// </summary>
10+
protected float Timer = 0;
11+
12+
/// <summary>
13+
/// Actual time of the Projectile
14+
/// </summary>
15+
[SerializeField]
16+
protected float MaxTimer = 5f;
17+
18+
[SerializeField]
19+
protected float MaxSpeed = 5f;
20+
21+
}
22+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// As informações gerais sobre um assembly são controladas por
6+
// conjunto de atributos. Altere estes valores de atributo para modificar as informações
7+
// associada a um assembly.
8+
[assembly: AssemblyTitle("Entities")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("Entities")]
13+
[assembly: AssemblyCopyright("Copyright © 2020")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Definir ComVisible como false torna os tipos neste assembly invisíveis
18+
// para componentes COM. Caso precise acessar um tipo neste assembly de
19+
// COM, defina o atributo ComVisible como true nesse tipo.
20+
[assembly: ComVisible(false)]
21+
22+
// O GUID a seguir será destinado à ID de typelib se este projeto for exposto para COM
23+
[assembly: Guid("2b74d005-d072-40b2-8c7c-cb0061c2b33c")]
24+
25+
// As informações da versão de um assembly consistem nos quatro valores a seguir:
26+
//
27+
// Versão Principal
28+
// Versão Secundária
29+
// Número da Versão
30+
// Revisão
31+
//
32+
// É possível especificar todos os valores ou usar como padrão os Números de Build e da Revisão
33+
// usando o "*" como mostrado abaixo:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]

0 commit comments

Comments
 (0)