-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25ca59d
commit 1c2e93e
Showing
8 changed files
with
190 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/PokemonGoDesktop.Unity.Common/Services/Observe/IObservable.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace PokemonGoDesktop.Unity.Common | ||
{ | ||
//based on net40 IObseravble<T> https://msdn.microsoft.com/en-us/library/dd990377(v=vs.110).aspx | ||
public interface IObservable<out T> | ||
{ | ||
/// <summary> | ||
/// Subscribers an observer for values of <typeparamref name="T"/>. | ||
/// </summary> | ||
/// <param name="observer">Observer to recieve values.</param> | ||
void Subscribe(IObserver<T> observer); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/PokemonGoDesktop.Unity.Common/Services/Observe/IObserver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace PokemonGoDesktop.Unity.Common | ||
{ | ||
//based on net40 IObserver<T> https://msdn.microsoft.com/en-us/library/dd783449(v=vs.110).aspx | ||
/// <summary> | ||
/// Class contract for being targted by <see cref="IObservable{T}"/>. | ||
/// </summary> | ||
/// <typeparam name="T">Type to observe.</typeparam> | ||
public interface IObserver<in T> | ||
{ | ||
/// <summary> | ||
/// Called when the <see cref="IObservable{T}"/> publishes | ||
/// a value. | ||
/// </summary> | ||
/// <param name="value">Value that was published.</param> | ||
void OnObserved(T value); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/PokemonGoDesktop.Unity.UI/Game/Profile/PlayerDataUIObserver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using PokemonGoDesktop.API.Proto; | ||
using PokemonGoDesktop.Unity.Common; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace PokemonGoDesktop.Unity.UI | ||
{ | ||
|
||
|
||
public class PlayerDataUIObserver : IObserver<PlayerData> | ||
{ | ||
|
||
|
||
public void OnObserved(PlayerData value) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
79 changes: 79 additions & 0 deletions
79
src/PokemonGoDesktop.Unity.UI/PokemonGoDesktop.Unity.UI.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{4386B5C3-76B8-456E-98A7-E62C3837C213}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>PokemonGoDesktop.Unity.UI</RootNamespace> | ||
<AssemblyName>PokemonGoDesktop.Unity.UI</AssemblyName> | ||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Easyception, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\Easyception.2.0.0\lib\net35\Easyception.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\PokemonGoDesktop.API.Proto.1.0.19\lib\net35\Google.Protobuf.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="PokemonGoDesktop.API.Proto, Version=1.0.19.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\PokemonGoDesktop.API.Proto.1.0.19\lib\net35\PokemonGoDesktop.API.Proto.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="UnityEngine"> | ||
<HintPath>..\..\lib\Unity3D\UnityEngine.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Game\Profile\PlayerDataUIObserver.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Folder Include="Services\" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\PokemonGoDesktop.Unity.Common\PokemonGoDesktop.Unity.Common.csproj"> | ||
<Project>{CC0CFF4C-D811-45FD-9215-92626A43C4BF}</Project> | ||
<Name>PokemonGoDesktop.Unity.Common</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("PokemonGoDesktop.Unity.UI")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("Microsoft")] | ||
[assembly: AssemblyProduct("PokemonGoDesktop.Unity.UI")] | ||
[assembly: AssemblyCopyright("Copyright © Microsoft 2016")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("4386b5c3-76b8-456e-98a7-e62c3837c213")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Easyception" version="2.0.0" targetFramework="net35" /> | ||
<package id="PokemonGoDesktop.API.Proto" version="1.0.19" targetFramework="net35" /> | ||
</packages> |