~ruther/NosSmooth

7ca88f702b6a59e9a5a3629df7b8529e7f47f635 — František Boháček 3 years ago f4d9014
feat: add entities types skeleton
A Core/NosSmooth.Game/Data/Entities/GroundItem.cs => Core/NosSmooth.Game/Data/Entities/GroundItem.cs +12 -0
@@ 0,0 1,12 @@
// 
// DroppedItem.cs
// 
// Copyright (c) Christofel authors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace NosSmooth.Game.Entities;

public class GroundItem
{
    
}
\ No newline at end of file

A Core/NosSmooth.Game/Data/Entities/IEntity.cs => Core/NosSmooth.Game/Data/Entities/IEntity.cs +36 -0
@@ 0,0 1,36 @@
//
//  IEntity.cs
//
//  Copyright (c) František Boháček. All rights reserved.
//  Licensed under the MIT license. See LICENSE file in the project root for full license information.

using NosCore.Shared.Enumerations;
using NosSmooth.Game.Data;

namespace NosSmooth.Game.Entities;

/// <summary>
/// Base type for entities.
/// </summary>
public interface IEntity
{
    /// <summary>
    /// Gets the id of the entity.
    /// </summary>
    public long Id { get; }

    /// <summary>
    /// Gets the name of the entity. May be null if unknown.
    /// </summary>
    public string? Name { get; }

    /// <summary>
    /// Gets the position of the entity.
    /// </summary>
    public Position Position { get; }

    /// <summary>
    /// Gets the type of the entity.
    /// </summary>
    public VisualType Type { get; }
}
\ No newline at end of file

A Core/NosSmooth.Game/Data/Entities/LivingEntity.cs => Core/NosSmooth.Game/Data/Entities/LivingEntity.cs +47 -0
@@ 0,0 1,47 @@
//
//  LivingEntity.cs
//
//  Copyright (c) František Boháček. All rights reserved.
//  Licensed under the MIT license. See LICENSE file in the project root for full license information.

using NosCore.Packets.Enumerations;
using NosCore.Shared.Enumerations;
using NosSmooth.Game.Data;

namespace NosSmooth.Game.Entities;

/// <summary>
/// Represents any nostale living entity such as monster, npc, player.
/// </summary>
public interface ILivingEntity : IEntity
{
    /// <summary>
    /// Gets the speed of the entity. May be null if unknown.
    /// </summary>
    public byte? Speed { get; }

    /// <summary>
    /// Gets the level of the entity. May be null if unknown.
    /// </summary>
    public ushort? Level { get; }

    /// <summary>
    /// Gets the direction the entity is looking. May be null if unknown.
    /// </summary>
    public byte? Direction { get; }

    /// <summary>
    /// Gets the percentage of the health points of the entity. May be null if unknown.
    /// </summary>
    public byte? HpPercentage { get; }

    /// <summary>
    /// Gets the percentage of the mana points of the entity. May be null if unknown.
    /// </summary>
    public byte? MpPercentage { get; }

    /// <summary>
    /// Gets the faction of the entity. May be null if unknown.
    /// </summary>
    public FactionType? Faction { get; }
}
\ No newline at end of file

A Core/NosSmooth.Game/Data/Entities/Monster.cs => Core/NosSmooth.Game/Data/Entities/Monster.cs +12 -0
@@ 0,0 1,12 @@
// 
// Monster.cs
// 
// Copyright (c) Christofel authors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace NosSmooth.Game.Entities;

public class Monster
{
    
}
\ No newline at end of file

A Core/NosSmooth.Game/Data/Entities/Npc.cs => Core/NosSmooth.Game/Data/Entities/Npc.cs +12 -0
@@ 0,0 1,12 @@
// 
// Npc.cs
// 
// Copyright (c) Christofel authors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace NosSmooth.Game.Entities;

public class Npc
{
    
}
\ No newline at end of file

A Core/NosSmooth.Game/Data/Entities/Partner.cs => Core/NosSmooth.Game/Data/Entities/Partner.cs +12 -0
@@ 0,0 1,12 @@
// 
// Partner.cs
// 
// Copyright (c) Christofel authors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace NosSmooth.Game.Entities;

public class Partner
{
    
}
\ No newline at end of file

A Core/NosSmooth.Game/Data/Entities/Pet.cs => Core/NosSmooth.Game/Data/Entities/Pet.cs +12 -0
@@ 0,0 1,12 @@
// 
// Pet.cs
// 
// Copyright (c) Christofel authors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace NosSmooth.Game.Entities;

public class Pet
{
    
}
\ No newline at end of file

A Core/NosSmooth.Game/Data/Entities/Player.cs => Core/NosSmooth.Game/Data/Entities/Player.cs +12 -0
@@ 0,0 1,12 @@
// 
// Player.cs
// 
// Copyright (c) Christofel authors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace NosSmooth.Game.Entities;

public class Player
{
    
}
\ No newline at end of file