Initial Commit
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using FlappyBird.Core;
|
||||
using FlappyBird.Pipes;
|
||||
using UnityEngine;
|
||||
using Zenject;
|
||||
|
||||
namespace FlappyBird.Ground
|
||||
{
|
||||
public class GroundView : MonoBehaviour, Core.IPoolable
|
||||
{
|
||||
private Transform _cachedTransform;
|
||||
|
||||
public float XPosition => _cachedTransform.position.x;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_cachedTransform = transform;
|
||||
}
|
||||
|
||||
public void SetPosition(Vector3 position)
|
||||
{
|
||||
_cachedTransform.position = position;
|
||||
}
|
||||
|
||||
public void MoveLeft(float distance)
|
||||
{
|
||||
_cachedTransform.position += Vector3.left * distance;
|
||||
}
|
||||
|
||||
public void OnSpawned()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnDespawned()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user