You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.4 KiB
C++
40 lines
1.4 KiB
C++
/*
|
|
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Multiplayer/NetworkInput/NetworkInput.h>
|
|
|
|
namespace Multiplayer
|
|
{
|
|
//! Max number of entities that can be children of our netbound player entity.
|
|
static constexpr uint32_t MaxEntityHierarchyChildren = 16;
|
|
|
|
//! Used by the EntityHierarchyComponent. This component allows the gameplay programmer to specify inputs for dependent entities.
|
|
//! Since it is possible to for the Client/Server to disagree about the state of related entities,
|
|
//! this network input encodes the entity that is associated with it.
|
|
class NetworkInputChild
|
|
{
|
|
public:
|
|
NetworkInputChild() = default;
|
|
NetworkInputChild(const NetworkInputChild& rhs) = default;
|
|
NetworkInputChild(const ConstNetworkEntityHandle& entityHandle);
|
|
|
|
NetworkInputChild& operator= (const NetworkInputChild& rhs);
|
|
|
|
void Attach(const ConstNetworkEntityHandle& entityHandle);
|
|
const ConstNetworkEntityHandle& GetOwner() const;
|
|
const NetworkInput& GetNetworkInput() const;
|
|
NetworkInput& GetNetworkInput();
|
|
|
|
bool Serialize(AzNetworking::ISerializer& serializer);
|
|
private:
|
|
ConstNetworkEntityHandle m_owner;
|
|
NetworkInput m_networkInput;
|
|
};
|
|
}
|