Skip to content

Commit 1197112

Browse files
authored
Merge pull request #16 from TwoTenPvP/synced-vars
Synced vars
2 parents c47a37b + fe88778 commit 1197112

File tree

6 files changed

+620
-20
lines changed

6 files changed

+620
-20
lines changed

MLAPI/Attributes/FieldType.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
namespace MLAPI.Attributes
2+
{
3+
internal enum FieldType
4+
{
5+
Bool,
6+
Byte,
7+
Char,
8+
Double,
9+
Single,
10+
Int,
11+
Long,
12+
SByte,
13+
Short,
14+
UInt,
15+
ULong,
16+
UShort,
17+
String,
18+
Vector3,
19+
Vector2,
20+
Quaternion
21+
}
22+
}

MLAPI/Attributes/SyncedVar.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
3+
namespace MLAPI.Attributes
4+
{
5+
[AttributeUsage(AttributeTargets.Field)]
6+
public class SyncedVar : Attribute
7+
{
8+
9+
}
10+
}

MLAPI/MLAPI.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -41,7 +41,7 @@
4141
<PlatformTarget>AnyCPU</PlatformTarget>
4242
<ErrorReport>prompt</ErrorReport>
4343
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
44-
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
44+
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
4545
</PropertyGroup>
4646
<ItemGroup>
4747
<Reference Include="System" />
@@ -56,6 +56,8 @@
5656
</Reference>
5757
</ItemGroup>
5858
<ItemGroup>
59+
<Compile Include="Attributes\FieldType.cs" />
60+
<Compile Include="Attributes\SyncedVar.cs" />
5961
<Compile Include="Data\NetworkPool.cs" />
6062
<Compile Include="Data\TrackedPointData.cs" />
6163
<Compile Include="MonoBehaviours\Prototyping\NetworkedAnimator.cs" />

0 commit comments

Comments
 (0)