﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Onward.CustomContent.Assets
{
    public class AmmoBox : Entity
    {
#if UNITY_EDITOR
        private void OnDrawGizmos()
        {
            // Draw "mesh"
            Gizmos.color = Color.yellow;

            Matrix4x4 oldMatrix = Gizmos.matrix;
            {
                Gizmos.matrix = transform.localToWorldMatrix;

#if false
                // Legs
                Gizmos.DrawCube(
                    new Vector3(-0.48552f, 0.67097f, 0.2308f),
                    new Vector3(0.05461716f, 0.3751523f, 0.04271976f));

                Gizmos.DrawCube(
                    new Vector3(0.4869f, 0.67097f, 0.2308f),
                    new Vector3(0.0527855f, 0.3751523f, 0.04271976f));

                Gizmos.DrawCube(
                    new Vector3(-0.48552f, 0.67097f, -0.418f),
                    new Vector3(0.05461716f, 0.3751523f, 0.04271976f));

                Gizmos.DrawCube(
                    new Vector3(0.4869f, 0.67097f, -0.418f),
                    new Vector3(0.0527855f, 0.3751523f, 0.04271976f));

                // Top
                Gizmos.DrawCube(
                    new Vector3(-0.0038f, 0.8682f, -0.09f),
                    new Vector3(1.11189f, 0.04166834f, 0.7678629f));

                Gizmos.color = Color.green;
#endif

                Gizmos.DrawLine(new Vector3(0f, 0.9809f, -0.2363f), new Vector3(0f, 0.9809f, -0.2363f) - Vector3.forward * 0.35f);

                // Ammo box
                Gizmos.DrawCube(
                    new Vector3(0f, 0.9809f, -0.2363f),
                    new Vector3(0.5913643f, 0.2667536f, 0.4069842f));
            }
            Gizmos.matrix = oldMatrix;
    }
#endif
            }
}
