Added: unity project for SOLID
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
namespace Solid.Interfaces
|
||||
{
|
||||
public interface IExplodable
|
||||
{
|
||||
void Explode();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6fe181c177dc4785b57b5d9238767d40
|
||||
timeCreated: 1790268080
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Solid.Interfaces
|
||||
{
|
||||
public interface IInput
|
||||
{
|
||||
Vector2 MovementInput { get; }
|
||||
Vector2 RotationInput { get; }
|
||||
event Action Fired;
|
||||
|
||||
void HandleInput();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35f86d33a6994aa9b367cfc6851dbcc1
|
||||
timeCreated: 1790264428
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace Solid.Interfaces
|
||||
{
|
||||
public interface IShooter
|
||||
{
|
||||
void Fire();
|
||||
|
||||
// BAD IDEA => segregate interfaces
|
||||
// void ApplyEffect();
|
||||
// void Explode();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58b030ec6de74f8aa019f8564285cc49
|
||||
timeCreated: 1790266519
|
||||
Reference in New Issue
Block a user