18 lines
560 B
C#
18 lines
560 B
C#
using Codice.CM.Client.Differences;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class DeleteShovel : DraggablePlaceholder
|
|
{
|
|
public override void Place()
|
|
{
|
|
var hit = LevelManager.Instance.Get<Ally>(x => x.Position.IsContainedIn(transform.position));
|
|
if (hit) Destroy(hit.gameObject);
|
|
}
|
|
public override bool CanBePlacedHere()
|
|
{
|
|
return LevelBoundCache.Contains(transform.position) && LevelManager.Instance.Has<Ally>(x => x.Position.IsContainedIn(transform.position));
|
|
}
|
|
}
|