<?xml version="1.0"?>

<Component
    Name="NetworkPlayerMovementComponent" 
    Namespace="${Name}" 
    OverrideComponent="false" 
    OverrideController="true" 
    OverrideInclude="Source/Components/NetworkPlayerMovementComponent.h"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="MultiplayerAutoComponentSchema.xsd">
    
    <ComponentRelation Constraint="Required" HasController="true" Name="NetworkTransformComponent" Namespace="Multiplayer" Include="Multiplayer/Components/NetworkTransformComponent.h" />
    <ComponentRelation Constraint="Required" HasController="true" Name="NetworkAnimationComponent" Namespace="${Name}" Include="Source/Components/NetworkAnimationComponent.h" />
    <ComponentRelation Constraint="Required" HasController="true" Name="NetworkCharacterComponent" Namespace="Multiplayer" Include="Multiplayer/Components/NetworkCharacterComponent.h" />
    <ComponentRelation Constraint="Required" HasController="true" Name="NetworkSimplePlayerCameraComponent" Namespace="${Name}" Include="Source/Components/NetworkSimplePlayerCameraComponent.h" />
    <ComponentRelation Constraint="Weak" HasController="true" Name="NetworkAiComponent" Namespace="${Name}" Include="Source/Components/NetworkAiComponent.h" />

    <Include File="Source/${Name}Types.h"/>

    <NetworkProperty Type="AZ::Vector3" Name="Velocity" Init="AZ::Vector3::CreateZero()" ReplicateFrom="Authority" ReplicateTo="Client" IsRewindable="true" IsPredictable="true" IsPublic="true" Container="Object" ExposeToEditor="false" ExposeToScript="true" GenerateEventBindings="true" Description="Current velocity of this player"/>

    <NetworkInput Type="StickAxis" Name="ForwardAxis" Init="0.0f" />
    <NetworkInput Type="StickAxis" Name="StrafeAxis"  Init="0.0f" />
    <NetworkInput Type="MouseAxis" Name="ViewYaw"     Init="0.0f" />
    <NetworkInput Type="MouseAxis" Name="ViewPitch"   Init="0.0f" />
    <NetworkInput Type="bool"      Name="Sprint"      Init="false" />
    <NetworkInput Type="bool"      Name="Jump"        Init="false" />
    <NetworkInput Type="bool"      Name="Crouch"      Init="false" />
    <NetworkInput Type="uint8_t"   Name="ResetCount"  Init="0" />

    <ArchetypeProperty Type="float" Name="WalkSpeed"    Init="3.0f" ExposeToEditor="true" Description="Walk speed, units in meters per second" />
    <ArchetypeProperty Type="float" Name="SprintSpeed"  Init="5.0f" ExposeToEditor="true" Description="Sprint speed, units in meters per second" />
    <ArchetypeProperty Type="float" Name="ReverseSpeed" Init="2.0f" ExposeToEditor="true" Description="Reverse speed, units in meters per second" />
    <ArchetypeProperty Type="float" Name="CrouchSpeed"  Init="1.5f" ExposeToEditor="true" Description="Crouching speed, units in meters per second" />

</Component>
