Example #1
0
    public Vector3[] GetPathFromClicked(Placeable arrival)
    {
        NodePath destination       = new NodePath(arrival.GetPosition().x, arrival.GetPosition().y, arrival.GetPosition().z, 0, null);
        NodePath inListDestination = playingPlaceable.AreaOfMouvement.Find(destination.Equals);

        if (inListDestination != null)
        {
            Vector3[] realPath = inListDestination.GetFullPath();
            return(realPath);
        }
        return(null);
    }
Example #2
0
    public virtual void SomethingPutAbove()
    {
        foreach (Transform obj in transform.Find("Inventory"))
        {
            obj.GetComponent <ObjectOnBloc>().SomethingPutAbove();
        }
        if (isSpawnPoint)
        {
            Placeable above = Grid.instance.GetPlaceableFromVector(GetPosition() + new Vector3Int(0, 1, 0));
            if (above != null && !above.IsLiving())
            {
                above.Destroy();

                Grid.instance.ConnexeFall(above.GetPosition().x, above.GetPosition().y, above.GetPosition().z);
                //                GameManager.instance.ResetAllBatches();
            }
        }
    }