44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
using UnityEngine.Serialization;
|
|
|
|
namespace Cielonos.MainGame.Characters
|
|
{
|
|
public partial class Player : CharacterBase
|
|
{
|
|
[TitleGroup("Presets")]
|
|
public PlayerViewPreset baseViewPreset;
|
|
|
|
[TitleGroup("Subcontrollers")]
|
|
[Required]
|
|
public PlayerInputSubcontroller inputSc;
|
|
[Required]
|
|
public PlayerOperationSubcontroller operationSc;
|
|
[Required]
|
|
public PlayerViewSubcontroller viewSc;
|
|
[Required]
|
|
public PlayerLandMovementSubcontroller landMovementSc => base.movementSc as PlayerLandMovementSubcontroller;
|
|
[Required]
|
|
public PlayerInventorySubcontroller inventorySc;
|
|
[HideInEditorMode]
|
|
public new PlayerAnimationSubcontroller animationSc => base.animationSc as PlayerAnimationSubcontroller;
|
|
}
|
|
|
|
public partial class Player
|
|
{
|
|
protected override void InitializeSubcontrollers()
|
|
{
|
|
base.InitializeSubcontrollers();
|
|
inputSc.Initialize();
|
|
operationSc.Initialize();
|
|
viewSc.Initialize();
|
|
inventorySc.Initialize();
|
|
reactionSc.Initialize();
|
|
}
|
|
}
|
|
|
|
public interface IPlayerSubcontroller
|
|
{
|
|
Player player { get; }
|
|
}
|
|
} |