problème : créer un placeholder par unit allait être un sale hassle solution : maintenant, le placeholder est créé dynamiquement note : also, j'ai ajouté un système pour ajouter des tiles
14 lines
319 B
C#
14 lines
319 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
|
|
public abstract class UnitPlacementButton : MonoBehaviour, IPointerDownHandler
|
|
{
|
|
public void OnPointerDown(PointerEventData eventData)
|
|
{
|
|
Place();
|
|
}
|
|
protected abstract void Place();
|
|
}
|