summaryrefslogtreecommitdiff
path: root/Impostor-dev/src/Impostor.Api/Net/IClientPlayer.cs
blob: 60702101e73e96e801ec3f98cbefff4cea3e8df1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System.Threading.Tasks;
using Impostor.Api.Games;
using Impostor.Api.Net.Inner;
using Impostor.Api.Net.Inner.Objects;

namespace Impostor.Api.Net
{
    /// <summary>
    ///     Represents a player in <see cref="IGame"/>.
    /// </summary>
    public interface IClientPlayer
    {
        /// <summary>
        ///     Gets the client that belongs to the player.
        /// </summary>
        IClient Client { get; }

        /// <summary>
        ///     Gets the game where the <see cref="IClientPlayer"/> belongs to.
        /// </summary>
        IGame Game { get; }

        /// <summary>
        ///     Gets or sets the current limbo state of the player.
        /// </summary>
        LimboStates Limbo { get; set; }

        IInnerPlayerControl? Character { get; }

        public bool IsHost { get; }

        /// <summary>
        ///     Checks if the specified <see cref="IInnerNetObject"/> is owned by <see cref="IClientPlayer"/>.
        /// </summary>
        /// <param name="netObject">The <see cref="IInnerNetObject"/>.</param>
        /// <returns>Returns true if owned by <see cref="IClientPlayer"/>.</returns>
        bool IsOwner(IInnerNetObject netObject);

        ValueTask KickAsync();

        ValueTask BanAsync();
    }
}