diff --git a/DungeonShooting_Godot/src/framework/map/mark/ActivityExpressionAttribute.cs b/DungeonShooting_Godot/src/framework/map/mark/ActivityExpressionAttribute.cs deleted file mode 100644 index 746d0e1..0000000 --- a/DungeonShooting_Godot/src/framework/map/mark/ActivityExpressionAttribute.cs +++ /dev/null @@ -1,10 +0,0 @@ -// using System; -// -// /// -// /// 用于 ActivityMark 字段上, 表示当前字段是一个表达式字段 -// /// -// [AttributeUsage(AttributeTargets.Field)] -// public class ActivityExpressionAttribute : Attribute -// { -// -// } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/mark/ActivityExpressionData.cs b/DungeonShooting_Godot/src/framework/map/mark/ActivityExpressionData.cs deleted file mode 100644 index 9e9dc7d..0000000 --- a/DungeonShooting_Godot/src/framework/map/mark/ActivityExpressionData.cs +++ /dev/null @@ -1,22 +0,0 @@ -// using System.Collections.Generic; -// -// /// -// /// -// /// -// public class ActivityExpressionData -// { -// /// -// /// 物体名称 -// /// -// public string Id; -// -// /// -// /// 传入参数 -// /// -// public Dictionary Args = new Dictionary(); -// -// public ActivityExpressionData(string id) -// { -// Id = id; -// } -// } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs b/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs deleted file mode 100644 index dbe19b2..0000000 --- a/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs +++ /dev/null @@ -1,415 +0,0 @@ -// -// using System; -// using System.Collections; -// using System.Collections.Generic; -// using System.Reflection; -// using System.Text.RegularExpressions; -// using Godot; -// -// /// -// /// 物体生成标记 -// /// -// [Tool, GlobalClass] -// public partial class ActivityMark : Node2D -// { -// /// -// /// 物体类型 -// /// -// [Export] -// public ActivityType Type = ActivityType.None; -// -// /// -// /// 创建物体的表达式, 该表达式计算出的id会自动加上 Type 前缀 -// /// 例如: 0001(w:100,ca:15,ra:30);0002(w:120,ca:10,ra:20) -// /// -// [Export(PropertyHint.Expression), ActivityExpression] -// public string ItemExpression; -// -// /// -// /// 所在层级 -// /// -// [Export] -// public RoomLayerEnum Layer = RoomLayerEnum.NormalLayer; -// -// /// -// /// 该标记在第几波调用 BeReady, -// /// 一个房间内所以敌人清完即可进入下一波 -// /// -// [Export] -// public int WaveNumber = 1; -// -// /// -// /// 延时执行时间,单位:秒 -// /// -// [Export] -// public float DelayTime = 0; -// -// /// -// /// 物体会在该矩形区域内随机位置生成 -// /// -// [Export] -// public Vector2I BirthRect = Vector2I.Zero; -// -// /// -// /// 绘制的颜色 -// /// -// [Export] -// public Color DrawColor = new Color(1, 1, 1, 1); -// -// /// -// /// 物体初始海拔高度 -// /// -// [ExportGroup("Vertical")] -// [Export(PropertyHint.Range, "0, 128")] -// public int Altitude = 8; -// -// /// -// /// 物体初始纵轴速度 -// /// -// [Export(PropertyHint.Range, "-1000,1000,0.1")] -// public float VerticalSpeed = 0; -// -// /// -// /// 当前标记所在Tile节点 -// /// -// public TileMap TileRoot; -// -// /// -// /// 随机数对象 -// /// -// public SeedRandom Random { get; private set; } -// -// //是否已经结束 -// private bool _isOver = true; -// private float _overTimer = 1; -// private float _timer = 0; -// private RoomInfo _tempRoomInfo; -// -// //已经计算好要生成的物体 -// private Dictionary _currentExpression = new Dictionary(); -// -// //存储所有 ActivityMark 和子类中被 [ActivityExpression] 标记的字段名称 -// private static Dictionary> _activityExpressionMap = new Dictionary>(); -// -// /// -// /// 对生成的物体执行后续操作 -// /// -// public virtual void Doing(ActivityObjectResult result, RoomInfo roomInfo) -// { -// } -// -// public ActivityMark() -// { -// //扫描所有 ActivityExpression -// var type = GetType(); -// if (!_activityExpressionMap.ContainsKey(type)) -// { -// // 获取类型信息 -// var fieldInfos = new List(); -// var tempList = type.GetFields(BindingFlags.Instance | BindingFlags.Public); -// foreach (var s in tempList) -// { -// if (s.GetCustomAttribute() != null) -// { -// fieldInfos.Add(s.Name); -// } -// } -// -// _activityExpressionMap.Add(type, fieldInfos); -// } -// } -// -// public override void _Process(double delta) -// { -// #if TOOLS -// if (Engine.IsEditorHint()) -// { -// QueueRedraw(); -// return; -// } -// #endif -// if (_isOver) -// { -// _overTimer += (float)delta; -// if (_overTimer >= 1) -// { -// SetActive(false); -// } -// } -// else -// { -// if (DelayTime > 0) -// { -// _timer += (float)delta; -// if (_timer >= DelayTime) -// { -// Doing(_tempRoomInfo); -// _tempRoomInfo = null; -// _isOver = true; -// } -// } -// } -// } -// -// /// -// /// 标记准备好了 -// /// -// public void BeReady(RoomInfo roomInfo) -// { -// if (_currentExpression == null || Type == ActivityType.Player) -// { -// return; -// } -// _isOver = false; -// _overTimer = 0; -// SetActive(true); -// if (DelayTime <= 0) -// { -// Doing(roomInfo); -// _isOver = true; -// } -// else -// { -// _timer = 0; -// _tempRoomInfo = roomInfo; -// } -// } -// -// /// -// /// 是否已经结束 -// /// -// public bool IsOver() -// { -// return _isOver && _overTimer >= 1; -// } -// -// private void Doing(RoomInfo roomInfo) -// { -// var result = CreateActivityObjectFromExpression(Type, nameof(ItemExpression)); -// -// if (result == null || result.ActivityObject == null) -// { -// return; -// } -// -// result.ActivityObject.VerticalSpeed = VerticalSpeed; -// result.ActivityObject.Altitude = Altitude; -// var pos = Position; -// if (BirthRect != Vector2I.Zero) -// { -// result.ActivityObject.Position = new Vector2( -// Random.RandomRangeInt((int)pos.X - BirthRect.X / 2, (int)pos.X + BirthRect.X / 2), -// Random.RandomRangeInt((int)pos.Y - BirthRect.Y / 2, (int)pos.Y + BirthRect.Y / 2) -// ); -// } -// else -// { -// result.ActivityObject.Position = pos; -// } -// -// result.ActivityObject.StartCoroutine(OnActivityObjectBirth(result.ActivityObject)); -// result.ActivityObject.PutDown(Layer); -// -// var effect1 = ResourceManager.LoadAndInstantiate(ResourcePath.prefab_effect_Effect1_tscn); -// effect1.Position = result.ActivityObject.Position + new Vector2(0, -Altitude); -// effect1.AddToActivityRoot(RoomLayerEnum.NormalLayer); -// -// Doing(result, roomInfo); -// } -// -// /// -// /// 生成 ActivityObject 时调用, 用于出生时的动画效果 -// /// -// private IEnumerator OnActivityObjectBirth(ActivityObject instance) -// { -// var a = 1.0f; -// instance.SetBlendColor(Colors.White); -// //禁用自定义行为 -// instance.EnableCustomBehavior = false; -// //禁用下坠 -// instance.EnableVerticalMotion = false; -// -// for (var i = 0; i < 10; i++) -// { -// instance.SetBlendSchedule(a); -// yield return 0; -// } -// -// while (a > 0) -// { -// instance.SetBlendSchedule(a); -// a -= 0.05f; -// yield return 0; -// } -// -// //启用自定义行为 -// instance.EnableCustomBehavior = true; -// //启用下坠 -// instance.EnableVerticalMotion = true; -// } -// -// #if TOOLS -// public override void _Draw() -// { -// if (Engine.IsEditorHint() || GameApplication.Instance.Debug) -// { -// var drawColor = DrawColor; -// -// //如果在编辑器中选中了该节点, 则绘更改绘制颜色的透明度 -// var selectedNodes = Plugin.Plugin.Instance?.GetEditorInterface()?.GetSelection()?.GetSelectedNodes(); -// if (selectedNodes != null && selectedNodes.Contains(this)) -// { -// drawColor.A = 1f; -// } -// else -// { -// drawColor.A = 0.5f; -// } -// -// DrawLine(new Vector2(-2, -2), new Vector2(2, 2), drawColor, 1f); -// DrawLine(new Vector2(-2, 2), new Vector2(2, -2), drawColor, 1f); -// -// if (BirthRect != Vector2.Zero) -// { -// DrawRect(new Rect2(-BirthRect / 2, BirthRect), drawColor, false, 0.5f); -// } -// -// DrawString(ResourceManager.DefaultFont12Px, new Vector2(-14, 12), WaveNumber.ToString(), HorizontalAlignment.Center, 28, 12); -// } -// } -// #endif -// -// /// -// /// 设置当前节点是否是活动状态 -// /// -// private void SetActive(bool flag) -// { -// // SetProcess(flag); -// // SetPhysicsProcess(flag); -// // SetProcessInput(flag); -// // Visible = flag; -// -// var parent = GetParent(); -// if (flag) -// { -// if (parent == null) -// { -// TileRoot.AddChild(this); -// } -// else if (parent != TileRoot) -// { -// parent.RemoveChild(this); -// TileRoot.AddChild(this); -// } -// Owner = TileRoot; -// } -// else -// { -// if (parent != null) -// { -// parent.RemoveChild(this); -// Owner = null; -// } -// } -// } -// -// //----------------------------------------------------------------------------------------------------- -// -// /// -// /// 执行预处理操作 -// /// -// public void Pretreatment(SeedRandom random) -// { -// Random = random; -// if (_activityExpressionMap.TryGetValue(GetType(), out var list)) -// { -// foreach (var field in list) -// { -// Pretreatment(field); -// } -// } -// } -// -// private void Pretreatment(string field) -// { -// var expressionStr = GetType().GetField(field)?.GetValue(this) as string; -// if (string.IsNullOrEmpty(expressionStr)) -// { -// _currentExpression.Add(field, new ActivityExpressionData("")); -// return; -// } -// var activityExpression = Parse(expressionStr); -// if (activityExpression.Count > 0) -// { -// //权重列表 -// var list = new List(); -// for (var i = 0; i < activityExpression.Count; i++) -// { -// var item = activityExpression[i]; -// if (item.Args.TryGetValue("weight", out var weight)) //获取自定义权重值 -// { -// list.Add(int.Parse(weight)); -// } -// else //默认权重100 -// { -// item.Args.Add("weight", "100"); -// list.Add(100); -// } -// } -// //根据权重随机值 -// var index = Random.RandomWeight(list); -// _currentExpression.Add(field, activityExpression[index]); -// } -// else -// { -// _currentExpression.Add(field, new ActivityExpressionData("")); -// } -// } -// -// private List Parse(string str) -// { -// var list = new List(); -// var exps = str.Split(';'); -// -// for (var i = 0; i < exps.Length; i++) -// { -// var exp = exps[i]; -// //去除空格 -// exp = Regex.Replace(exp, "\\s", ""); -// if (string.IsNullOrEmpty(exp)) -// { -// continue; -// } -// -// //验证语法 -// if (Regex.IsMatch(exp, "^\\w+(\\((\\w+:\\w+)*(,\\w+:\\w+)*\\))?$")) -// { -// if (!exp.Contains('(')) //没有参数 -// { -// list.Add(new ActivityExpressionData(exp)); -// } -// else -// { -// var name = Regex.Match(exp, "^\\w+").Value; -// var activityExpression = new ActivityExpressionData(name); -// var paramsResult = Regex.Matches(exp, "\\w+:\\w+"); -// if (paramsResult.Count > 0) -// { -// foreach (Match result in paramsResult) -// { -// var valSplit = result.Value.Split(':'); -// activityExpression.Args.Add(valSplit[0], valSplit[1]); -// } -// } -// list.Add(activityExpression); -// } -// } -// else //语法异常 -// { -// throw new Exception("表达式语法错误: " + exp); -// } -// } -// -// return list; -// } -// } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/mark/ActivityMark_HandlerExpression.cs b/DungeonShooting_Godot/src/framework/map/mark/ActivityMark_HandlerExpression.cs deleted file mode 100644 index 2baed5c..0000000 --- a/DungeonShooting_Godot/src/framework/map/mark/ActivityMark_HandlerExpression.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// using System; -// using Godot; -// -// public partial class ActivityMark -// { -// /// -// /// 根据预制表达式创建物体并返回 -// /// -// /// 物体类型 -// /// 预制表达式字段名称, 注意是字段名称, 而不是内容 -// public ActivityObjectResult CreateActivityObjectFromExpression(ActivityType type, string expressionFieldName) where T : ActivityObject -// { -// if (_currentExpression.TryGetValue(expressionFieldName, out var expressionData)) -// { -// if (expressionData.Id == "null") -// { -// return null; -// } -// var id = ActivityId.GetIdPrefix(type) + expressionData.Id; -// var activityObject = ActivityObject.Create(id); -// if (activityObject == null) -// { -// return null; -// } -// -// HandlerExpressionArgs(type, activityObject, expressionData); -// return new ActivityObjectResult(activityObject, expressionData); -// } -// -// GD.PrintErr("未找到表达式字段: " + expressionFieldName + ", 请检查是否有该字段或者该字段加上了[ActivityExpression]标记"); -// return null; -// } -// -// private void HandlerExpressionArgs(ActivityType type, ActivityObject instance, ActivityExpressionData expressionData) -// { -// switch (type) -// { -// case ActivityType.None: -// break; -// case ActivityType.Player: -// break; -// case ActivityType.Test: -// break; -// case ActivityType.Role: -// break; -// case ActivityType.Enemy: -// break; -// case ActivityType.Weapon: -// { -// var weapon = (Weapon)instance; -// //当前弹夹弹药量 -// if (expressionData.Args.TryGetValue("CurrAmmon", out var currAmmon)) -// { -// weapon.SetCurrAmmo(int.Parse(currAmmon)); -// } -// //备用弹药量 -// if (expressionData.Args.TryGetValue("ResidueAmmo", out var residueAmmo)) -// { -// weapon.SetResidueAmmo(int.Parse(residueAmmo)); -// } -// } -// break; -// case ActivityType.Bullet: -// break; -// case ActivityType.Shell: -// break; -// case ActivityType.Other: -// break; -// } -// } -// } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/mark/ActivityObjectResult.cs b/DungeonShooting_Godot/src/framework/map/mark/ActivityObjectResult.cs deleted file mode 100644 index 01b4e2e..0000000 --- a/DungeonShooting_Godot/src/framework/map/mark/ActivityObjectResult.cs +++ /dev/null @@ -1,22 +0,0 @@ -// -// /// -// /// 通过表达式创建的 ActivityObject 对象结果集 -// /// -// public class ActivityObjectResult where T : ActivityObject -// { -// /// -// /// 实例 -// /// -// public T ActivityObject; -// -// /// -// /// 创建该对象使用的表达式数据 -// /// -// public ActivityExpressionData ExpressionData; -// -// public ActivityObjectResult(T activityObject, ActivityExpressionData expressionData) -// { -// ActivityObject = activityObject; -// ExpressionData = expressionData; -// } -// } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/mark/EnemyMark.cs b/DungeonShooting_Godot/src/framework/map/mark/EnemyMark.cs deleted file mode 100644 index 241c72b..0000000 --- a/DungeonShooting_Godot/src/framework/map/mark/EnemyMark.cs +++ /dev/null @@ -1,91 +0,0 @@ -// -// using Godot; -// -// /// -// /// 针对敌人生成位置的标记 -// /// -// [Tool, GlobalClass] -// public partial class EnemyMark : ActivityMark -// { -// /// -// /// 脸默认朝向 -// /// -// public enum FaceDirectionValueEnum -// { -// /// -// /// 随机 -// /// -// Random, -// /// -// /// 左边 -// /// -// Left, -// /// -// /// 右边 -// /// -// Right -// } -// -// /// -// /// 武器1 id, id会自动加上武器前缀 -// /// -// [Export(PropertyHint.Expression), ActivityExpression] -// public string Weapon1Id; -// /// -// /// 武器2 id, id会自动加上武器前缀 -// /// -// [Export(PropertyHint.Expression), ActivityExpression] -// public string Weapon2Id; -// /// -// /// 脸默认的朝向 -// /// -// [Export] -// public FaceDirectionValueEnum FaceDirection = FaceDirectionValueEnum.Random; -// -// public override void _Ready() -// { -// Type = ActivityType.Enemy; -// Layer = RoomLayerEnum.YSortLayer; -// Altitude = 0; -// } -// -// public override void Doing(ActivityObjectResult result, RoomInfo roomInfo) -// { -// //创建敌人 -// var instance = (Enemy)result.ActivityObject; -// var pos = instance.Position; -// -// //脸的朝向 -// if (FaceDirection == FaceDirectionValueEnum.Random) -// { -// instance.Face = Random.RandomBoolean() ? global::FaceDirection.Left : global::FaceDirection.Right; -// } -// else if (FaceDirection == FaceDirectionValueEnum.Left) -// { -// instance.Face = global::FaceDirection.Left; -// } -// else -// { -// instance.Face = global::FaceDirection.Right; -// } -// -// if (!string.IsNullOrWhiteSpace(Weapon1Id)) -// CreateWeapon(instance, pos, nameof(Weapon1Id)); -// if (!string.IsNullOrWhiteSpace(Weapon2Id)) -// CreateWeapon(instance, pos, nameof(Weapon2Id)); -// } -// -// //生成武器 -// private void CreateWeapon(Enemy enemy, Vector2 pos, string fieldName) -// { -// var result = CreateActivityObjectFromExpression(ActivityType.Weapon, fieldName); -// if (result != null) -// { -// //如果不能放下, 则直接扔地上 -// if (!enemy.PickUpWeapon(result.ActivityObject)) -// { -// result.ActivityObject.PutDown(pos, RoomLayerEnum.NormalLayer); -// } -// } -// } -// } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/test/TestDungeonGenerator.cs b/DungeonShooting_Godot/src/test/TestDungeonGenerator.cs deleted file mode 100644 index 5fae0a7..0000000 --- a/DungeonShooting_Godot/src/test/TestDungeonGenerator.cs +++ /dev/null @@ -1,109 +0,0 @@ - -using Godot; - -/// -/// 测试地牢生成 -/// -public partial class TestDungeonGenerator : Node2D -{ - [Export] public NodePath TileMapPath; - [Export] public NodePath Camera3D; - - private TileMap _tileMap; - private Camera2D _camera; - - private DungeonGenerator _dungeonGenerator; - private Font _font; - - // public override void _Ready() - // { - // _tileMap = GetNode(TileMapPath); - // _camera = GetNode(Camera3D); - // - // _font = ResourceManager.Load(ResourcePath.resource_font_cn_font_36_tres); - // - // _generateDungeon = new GenerateDungeon(); - // _generateDungeon.Generate(); - // - // foreach (var info in _generateDungeon.RoomInfos) - // { - // //临时铺上地砖 - // var id = (int)_tileMap.TileSet.GetTilesIds()[0]; - // for (int i = 0; i < info.Size.X; i++) - // { - // for (int j = 0; j < info.Size.Y; j++) - // { - // _tileMap.SetCell(i + (int)info.Position.X, j + (int)info.Position.Y, id); - // } - // } - // } - // } - // - // public override void _Process(float delta) - // { - // //移动相机位置 - // var dir = Input.GetVector("ui_left", "ui_right", "ui_up", "ui_down"); - // _camera.Position += dir * 1000 * delta; - // - // Update(); - // } - // - // public override void _Draw() - // { - // DrawRoomInfo(_generateDungeon.StartRoom); - // - // } - // - // private void DrawRoomInfo(RoomInfo room) - // { - // var cellSize = _tileMap.CellSize; - // var pos1 = (room.Position + room.Size / 2) * cellSize; - // foreach (var nextRoom in room.Next) - // { - // var pos2 = (nextRoom.Position + nextRoom.Size / 2) * cellSize; - // DrawLine(pos1, pos2, Colors.Red); - // DrawRoomInfo(nextRoom); - // } - // - // DrawString(_font, pos1, room.Id.ToString(), Colors.Yellow); - // - // foreach (var roomDoor in room.Doors) - // { - // var originPos = roomDoor.OriginPosition * cellSize; - // switch (roomDoor.Direction) - // { - // case DoorDirection.E: - // DrawLine(originPos, originPos + new Vector2(3, 0) * cellSize, Colors.Yellow); - // DrawLine(originPos + new Vector2(0, 4) * cellSize, originPos + new Vector2(3, 4) * cellSize, - // Colors.Yellow); - // break; - // case DoorDirection.W: - // DrawLine(originPos, originPos - new Vector2(3, 0) * cellSize, Colors.Yellow); - // DrawLine(originPos + new Vector2(0, 4) * cellSize, originPos - new Vector2(3, -4) * cellSize, - // Colors.Yellow); - // break; - // case DoorDirection.S: - // DrawLine(originPos, originPos + new Vector2(0, 3) * cellSize, Colors.Yellow); - // DrawLine(originPos + new Vector2(4, 0) * cellSize, originPos + new Vector2(4, 3) * cellSize, - // Colors.Yellow); - // break; - // case DoorDirection.N: - // DrawLine(originPos, originPos - new Vector2(0, 3) * cellSize, Colors.Yellow); - // DrawLine(originPos + new Vector2(4, 0) * cellSize, originPos - new Vector2(-4, 3) * cellSize, - // Colors.Yellow); - // break; - // } - // - // if (roomDoor.HasCross && roomDoor.RoomInfo.Id < roomDoor.ConnectRoom.Id) - // { - // DrawRect(new Rect2(roomDoor.Cross * cellSize, cellSize * 4), Colors.Yellow); - // } - // } - // - // //绘制地图上被占用的网格 - // // _generateDungeon.RoomGrid.ForEach((x, y, value) => - // // { - // // DrawRect(new Rect2(new Vector2(x, y) * cellSize + new Vector2(6, 6), new Vector2(4, 4)), Colors.Green); - // // }); - // } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/test/TestExpression.cs b/DungeonShooting_Godot/src/test/TestExpression.cs deleted file mode 100644 index 94614a0..0000000 --- a/DungeonShooting_Godot/src/test/TestExpression.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Godot; -using System; -using System.Collections.Generic; -using System.Text.RegularExpressions; - -public partial class TestExpression : Node2D -{ - [Export(PropertyHint.Expression)] - public string Str; - - public override void _Ready() - { - //var expressions = Pretreatment(Str); - - } - - -} diff --git a/DungeonShooting_Godot/src/test/TestNavigation.cs b/DungeonShooting_Godot/src/test/TestNavigation.cs deleted file mode 100644 index 137046a..0000000 --- a/DungeonShooting_Godot/src/test/TestNavigation.cs +++ /dev/null @@ -1,43 +0,0 @@ -using Godot; - -/// -/// 该demo是以3.4为基础做的导航demo, 后面3.5出了新的导航系统, 游戏中已采用新的导航方案 -/// -public partial class TestNavigation : Node2D -{ - - // private Node2D Node2D; - // private Vector2[] points = new Vector2[0]; - // - // public override void _Ready() - // { - // Node2D = GetNode("Marker2D/Node2D"); - // } - // - // public override void _Input(InputEvent @event) - // { - // if (@event is InputEventMouseButton ieb) { - // if (ieb.ButtonIndex == (int)ButtonList.Left && ieb.Pressed) - // { - // points = Node2D.GetSimplePath(Vector2.Zero, Node2D.ToLocal(ieb.Position)); - // Update(); - // string str = ""; - // foreach (var item in points) - // { - // str += item; - // } - // GD.Print("路径: " + points.Length + ", " + str); - // } - // } - // } - // - // public override void _Draw() - // { - // if (points.Length >= 2) - // { - // GD.Print("绘制线段..."); - // DrawPolyline(points, Colors.Red); - // // DrawMultiline(points, Colors.Red); - // } - // } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/test/TestReadExcel.cs b/DungeonShooting_Godot/src/test/TestReadExcel.cs deleted file mode 100644 index eee0656..0000000 --- a/DungeonShooting_Godot/src/test/TestReadExcel.cs +++ /dev/null @@ -1,50 +0,0 @@ -using Godot; -using System; -using System.IO; -// using NPOI.SS.UserModel; -// using NPOI.XSSF.UserModel; - -public partial class TestReadExcel : Node2D -{ - public override void _Ready() - { - // string sourceFile = @"excel/Weapon.xlsx"; - // - // IWorkbook workbook = new XSSFWorkbook(sourceFile); - // ISheet sheet1 = workbook.GetSheet("Sheet1"); - // - // int columnCount = -1; - // foreach (IRow row in sheet1) - // { - // foreach (var cell in row) - // { - // if (columnCount >= 0 && cell.ColumnIndex >= columnCount) - // { - // break; - // } - // var value = cell.StringCellValue; - // if (string.IsNullOrEmpty(value)) - // { - // if (columnCount < 0) - // { - // columnCount = cell.ColumnIndex; - // break; - // } - // else if (cell.ColumnIndex == 0) - // { - // break; - // } - // } - // GD.Print("row: " + row.RowNum + " , Column: " + cell.ColumnIndex + ", value: " + cell.StringCellValue); - // } - // } - // workbook.Close(); - // sheet1.CreateRow(0).CreateCell(0).SetCellValue(1); - // sheet1.CreateRow(1).CreateCell(0).SetCellValue(2); - // sheet1.CreateRow(2).CreateCell(0).SetCellValue(3); - // - // FileStream fs = new FileStream(targetFile, FileMode.Create); - // workbook.Write(fs, true); - // workbook.Close(); - } -}