Ejemplo n.º 1
0
    /// <summary>tries to push a pushable</summary>
    /// <param name="worldOrigin">Tile you're interacting from</param>
    /// <param name="direction">Direction you're pushing</param>
    private void InteractPushable(Vector3Int worldOrigin, Vector3 direction)
    {
        if (IsNonStickyServer)
        {
            return;
        }
        List <PushPull> pushables = MatrixManager.GetPushableAt(worldOrigin, direction.To2Int(), gameObject);

        if (pushables.Count > 0)
        {
            pushables[0].TryPush(direction.To2Int());
        }
    }