Initial commit
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DependencyInjection;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// encapsulate the behaviors implementation and added to the ghost block on runtime
|
||||
/// </summary>
|
||||
public class GhostController : MonoBehaviour
|
||||
{
|
||||
[RuntimeInject]
|
||||
private IPlacementHandler placementHandler;
|
||||
[Inject]
|
||||
private IBlockValidator blockValidator;
|
||||
private ISnapBehavior snapBehavior;
|
||||
private IVisualFeedback visualFeedback;
|
||||
private IRotateHandler rotationHandler;
|
||||
private GlopalLogger logger;
|
||||
|
||||
[Inject]
|
||||
public void init(GlopalLogger logger)
|
||||
{
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (blockValidator == null)
|
||||
{
|
||||
logger.Log("Hamada msh Maugod");
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.Log("Laa Hamada Maugod");
|
||||
}
|
||||
if (placementHandler == null)
|
||||
{
|
||||
logger.Log("Hamada Eltany msh Maugod");
|
||||
}
|
||||
else
|
||||
{
|
||||
placementHandler.Debugln();
|
||||
}
|
||||
Invoke(nameof(check), 15);
|
||||
}
|
||||
void check()
|
||||
{
|
||||
if (placementHandler == null)
|
||||
{
|
||||
logger.Log("Hamada Eltany msh Maugod");
|
||||
}
|
||||
else
|
||||
{
|
||||
placementHandler.Debugln();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user