Платформер враги, инфраструктура, герой
This commit is contained in:
1 parent
28125eb382
commit
93819c1dd3
61 files changed
+1463
-423
No files matched your search
@@ -15,10 +15,10 @@ namespace Code.Example.Race.Racer.Player
|
||||
public void Construct(IInputService inputService)
|
||||
{
|
||||
_inputService = inputService;
|
||||
_inputService.BindActionPerformed((int)ActionMappings.Gameplay, (int)GameplayActions.Move, MovementPerformed);
|
||||
_inputService.BindActionCancelled((int)ActionMappings.Gameplay, (int)GameplayActions.Move, MovementEnded);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.Gameplay, (int)GameplayActions.Brake, BrakePerformed);
|
||||
_inputService.BindActionCancelled((int)ActionMappings.Gameplay, (int)GameplayActions.Brake, BrakeEnded);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.Race, (int)RaceActions.Move, MovementPerformed);
|
||||
_inputService.BindActionCancelled((int)ActionMappings.Race, (int)RaceActions.Move, MovementEnded);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.Race, (int)RaceActions.Brake, BrakePerformed);
|
||||
_inputService.BindActionCancelled((int)ActionMappings.Race, (int)RaceActions.Brake, BrakeEnded);
|
||||
}
|
||||
|
||||
private void MovementPerformed(InputAction.CallbackContext context) => MovementInput = context.ReadValue<Vector2>();
|
||||
@@ -32,10 +32,10 @@ namespace Code.Example.Race.Racer.Player
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (_inputService == null) return;
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.Gameplay, (int)GameplayActions.Move, MovementPerformed);
|
||||
_inputService.UnbindActionCancelled((int)ActionMappings.Gameplay, (int)GameplayActions.Move, MovementEnded);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.Gameplay, (int)GameplayActions.Brake, BrakePerformed);
|
||||
_inputService.UnbindActionCancelled((int)ActionMappings.Gameplay, (int)GameplayActions.Brake, BrakeEnded);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.Race, (int)RaceActions.Move, MovementPerformed);
|
||||
_inputService.UnbindActionCancelled((int)ActionMappings.Race, (int)RaceActions.Move, MovementEnded);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.Race, (int)RaceActions.Brake, BrakePerformed);
|
||||
_inputService.UnbindActionCancelled((int)ActionMappings.Race, (int)RaceActions.Brake, BrakeEnded);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ using UnityEngine;
|
||||
|
||||
namespace Code.Example.Race.UI
|
||||
{
|
||||
public class PlayerScoreCounter : UIPanel, IScoreChangedHandle
|
||||
public partial class PlayerScoreCounter : UIPanel, IScoreChangedHandle
|
||||
{
|
||||
[SerializeField] private TMP_Text playerScore;
|
||||
private EventBus _eventBus;
|
||||
|
||||
@@ -8,7 +8,7 @@ using UnityEngine.UI;
|
||||
|
||||
namespace Code.Example.Race.UI
|
||||
{
|
||||
public class PlayerScores : UIPanel
|
||||
public partial class PlayerScores : UIPanel
|
||||
{
|
||||
[SerializeField] private Image image;
|
||||
[SerializeField] private TMP_Text scoreText;
|
||||
|
||||
@@ -7,7 +7,7 @@ using UnityEngine.UI;
|
||||
|
||||
namespace Code.Example.Race.UI
|
||||
{
|
||||
public class WinScreen : UIPanel
|
||||
public partial class WinScreen : UIPanel
|
||||
{
|
||||
[SerializeField] private Image image;
|
||||
[SerializeField] private TMP_Text winText;
|
||||
|
||||
Reference in new issue
Block a user