Merge branch 'GameLogicBranch' of https://github.com/dean11/Danbias into GameLogicBranch
Conflicts: Code/GameLogic/Player.cpp
This commit is contained in:
commit
5cc6ff81b5
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -66,24 +66,28 @@
|
|||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)..\External\Bin\DLL\$(ProjectName)\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\Bin\DLL\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\</IntDir>
|
||||
<TargetName>$(ProjectName)_$(PlatformShortName)D</TargetName>
|
||||
<LibraryPath>$(SolutionDir)..\Bin\DLL;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)..\External\Bin\DLL\$(ProjectName)\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\Bin\DLL\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\</IntDir>
|
||||
<TargetName>$(ProjectName)_$(PlatformShortName)</TargetName>
|
||||
<LibraryPath>$(SolutionDir)..\Bin\DLL;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)..\External\Bin\DLL\$(ProjectName)\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\Bin\DLL\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\</IntDir>
|
||||
<TargetName>$(ProjectName)_$(PlatformShortName)D</TargetName>
|
||||
<LibraryPath>$(SolutionDir)..\Bin\DLL;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)..\External\Bin\DLL\$(ProjectName)\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\Bin\DLL\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\</IntDir>
|
||||
<TargetName>$(ProjectName)_$(PlatformShortName)</TargetName>
|
||||
<LibraryPath>$(SolutionDir)..\Bin\DLL;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
|
@ -95,6 +99,7 @@
|
|||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>GamePhysics_$(PlatformShortName)D.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
|
@ -107,6 +112,7 @@
|
|||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>GamePhysics_$(PlatformShortName)D.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
|
@ -123,6 +129,7 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>GamePhysics_$(PlatformShortName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
|
@ -139,6 +146,7 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>GamePhysics_$(PlatformShortName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -46,10 +46,9 @@ Player::Player(void)
|
|||
{
|
||||
life = 10;
|
||||
|
||||
rigidBody = API::Instance().CreateSimpleRigidBody();
|
||||
UniquePointer<ICustomBody> rigidBody = API::Instance().CreateSimpleRigidBody();
|
||||
API::Instance().AddObject(rigidBody);
|
||||
|
||||
|
||||
//ref = API::Instance().AddObject(rigidBody);
|
||||
////ref = API::Instance().AddObject(API::Instance().CreateSimpleRigidBody());
|
||||
//const ICustomBody* rB;
|
||||
|
||||
|
|
|
@ -37,6 +37,14 @@ namespace Utility
|
|||
this->ownedInstance = assignedInstance;
|
||||
}
|
||||
|
||||
template<typename Type>
|
||||
UniquePointer<Type>::UniquePointer( const UniquePointer<Type> &donor )
|
||||
{
|
||||
this->ownedInstance = donor.ownedInstance;
|
||||
donor.ownedInstance = NULL;
|
||||
|
||||
}
|
||||
|
||||
template<typename Type>
|
||||
UniquePointer<Type>::~UniquePointer()
|
||||
{
|
||||
|
@ -110,6 +118,14 @@ namespace Utility
|
|||
this->ownedArray = assignedArray;
|
||||
}
|
||||
|
||||
template<typename Type>
|
||||
UniqueArray<Type>::UniqueArray( const UniqueArray<Type> &donor )
|
||||
{
|
||||
this->ownedArray = donor.ownedArray;
|
||||
donor.ownedArray = NULL;
|
||||
|
||||
}
|
||||
|
||||
template<typename Type>
|
||||
UniqueArray<Type>::~UniqueArray()
|
||||
{
|
||||
|
|
|
@ -27,18 +27,22 @@ namespace Utility
|
|||
{
|
||||
public:
|
||||
//! Assigns assignedInstance ownership to this UniquePonter, old owned instance will be deleted.
|
||||
//! If NULL is assigned is equavalent with clearing all responsibilities from this UniquePointer.
|
||||
//! If NULL is assigned is equivalent with clearing all responsibilities from this UniquePointer.
|
||||
UniquePointer( Type *assignedInstance = NULL );
|
||||
|
||||
//! Transfers assignedInstance ownership from donor to this UniquePonter, old owned instance will be deleted.
|
||||
//! If donor had nothing, is equivalent with clearing all responsibilities from this UniquePointer.
|
||||
UniquePointer( const UniquePointer<Type> &donor );
|
||||
|
||||
//! Will auto delete assigned dynamic instance.
|
||||
~UniquePointer();
|
||||
|
||||
//! Assigns assignedInstance ownership to this UniquePonter, old owned instance will be deleted.
|
||||
//! If NULL is assigned is equavalent with clearing all responsibilities from this UniquePointer.
|
||||
//! If NULL is assigned is equivalent with clearing all responsibilities from this UniquePointer.
|
||||
UniquePointer<Type> & operator = ( Type *assignedInstance );
|
||||
|
||||
//! Transfers assignedInstance ownership from donor to this UniquePonter, old owned instance will be deleted.
|
||||
//! If donor had nothing, is equavalent with clearing all responsibilities from this UniquePointer.
|
||||
//! If donor had nothing, is equivalent with clearing all responsibilities from this UniquePointer.
|
||||
UniquePointer<Type> & operator = ( const UniquePointer<Type> &donor );
|
||||
|
||||
//! Access the assigned dynamic instance. Will crash if nothing there
|
||||
|
@ -71,18 +75,22 @@ namespace Utility
|
|||
{ //! Wrapper to safely transfer dynamic ownership/responsibility
|
||||
public:
|
||||
//! Assigns assignedInstance ownership to this UniquePonter, old owned array will be deleted.
|
||||
//! If NULL is assigned is equavalent with clearing all responsibilities from this UniqueArray.
|
||||
//! If NULL is assigned is equivalent with clearing all responsibilities from this UniqueArray.
|
||||
UniqueArray( Type assignedArray[] = NULL );
|
||||
|
||||
//! Transfers assignedInstance ownership from donor to this UniquePonter, old owned array will be deleted.
|
||||
//! If donor had nothing, is equivalent with clearing all responsibilities from this UniqueArray.
|
||||
UniqueArray( const UniqueArray<Type> &donor );
|
||||
|
||||
//! Will auto delete assigned dynamic array.
|
||||
~UniqueArray();
|
||||
|
||||
//! Assigns assignedInstance ownership to this UniquePonter, old owned array will be deleted.
|
||||
//! If NULL is assigned is equavalent with clearing all responsibilities from this UniqueArray.
|
||||
//! If NULL is assigned is equivalent with clearing all responsibilities from this UniqueArray.
|
||||
UniqueArray<Type> & operator = ( Type assignedArray[] );
|
||||
|
||||
//! Transfers assignedInstance ownership from donor to this UniquePonter, old owned array will be deleted.
|
||||
//! If donor had nothing, is equavalent with clearing all responsibilities from this UniqueArray.
|
||||
//! If donor had nothing, is equivalent with clearing all responsibilities from this UniqueArray.
|
||||
UniqueArray<Type> & operator = ( const UniqueArray<Type> &donor );
|
||||
|
||||
//! Accesses the instance at index i of this UniqeArray's owned dynamic array.
|
||||
|
|
Loading…
Reference in New Issue