示例#1
0
        public static float3 GetTranslationComponentByHexCoordinates(HexCoordinates hexCoordinates)
        {
            EntityManager entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
            Entity        hexCell       = HexCellService.FindBy(hexCoordinates);
            float3        translation   = float3.zero;

            if (Entity.Null != hexCell)
            {
                translation = entityManager.GetComponentData <Translation>(hexCell).Value;
            }

            translation.y += 0.10f;

            return(translation);
        }
        public Entity GetNeighborCell(HexDirection direction)
        {
            HexCoordinates targetHexCoordinates = GetTargetHexCoordinates(direction);

            return(HexCellService.FindBy(targetHexCoordinates));
        }