19 lines
467 B
C#
19 lines
467 B
C#
using UnityEngine;
|
|
using Code.Configs;
|
|
using Reflex.Attributes;
|
|
|
|
namespace Code.Gameplay.Player
|
|
{
|
|
public class PlayerFactory : IPlayerFactory
|
|
{
|
|
[Inject] PlayerConfig _playerConfig;
|
|
|
|
public PlayerHealth CreatePlayerHealth(int count = -1)
|
|
{
|
|
if (count < 0) count = _playerConfig.maxHealth;
|
|
|
|
return new(count);
|
|
}
|
|
public PlayerMoney CreatePlayerMoney(int count = 0) => new(count);
|
|
}
|
|
} |