Compare commits
No commits in common. '98d5d0d6e3595125e42b7add3fb9d9ffc72ee3fb' and 'c89d789c840b9f4b64d1becbc94a30a2072d2297' have entirely different histories.
98d5d0d6e3
...
c89d789c84
17 changed files with 37 additions and 274 deletions
@ -1,21 +0,0 @@ |
|||||||
MIT License |
|
||||||
|
|
||||||
Copyright (c) 2023 凉鞋 |
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||||
of this software and associated documentation files (the "Software"), to deal |
|
||||||
in the Software without restriction, including without limitation the rights |
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||||
copies of the Software, and to permit persons to whom the Software is |
|
||||||
furnished to do so, subject to the following conditions: |
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all |
|
||||||
copies or substantial portions of the Software. |
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|
||||||
SOFTWARE. |
|
@ -1,60 +0,0 @@ |
|||||||
using Godot; |
|
||||||
using static Godot.GD; |
|
||||||
using System; |
|
||||||
using System.Collections.Generic; |
|
||||||
|
|
||||||
namespace EGFramework{ |
|
||||||
public partial class EGThread : Node,IModule,IEGFramework{ |
|
||||||
|
|
||||||
public EasyEventOnce EventPool = new EasyEventOnce(); |
|
||||||
public Dictionary<Action,SceneTreeTimer> EventDelayPool = new Dictionary<Action, SceneTreeTimer>(); |
|
||||||
|
|
||||||
public void Init() |
|
||||||
{ |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
public override void _Ready() |
|
||||||
{ |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
public override void _Process(double delta) |
|
||||||
{ |
|
||||||
//base._Process(delta); |
|
||||||
EventPool.Invoke(); |
|
||||||
} |
|
||||||
|
|
||||||
public void ExecuteInMainThread(Action action){ |
|
||||||
//ActionQueue.Enqueue(action); |
|
||||||
EventPool.Register(action); |
|
||||||
} |
|
||||||
|
|
||||||
public void ExecuteAfterSecond(Action action,double delay){ |
|
||||||
SceneTreeTimer timer = this.GetTree().CreateTimer(delay); |
|
||||||
timer.Timeout += action; |
|
||||||
timer.Timeout += () => EventDelayPool.Remove(action); |
|
||||||
EventDelayPool.Add(action,timer); |
|
||||||
} |
|
||||||
|
|
||||||
public IArchitecture GetArchitecture() |
|
||||||
{ |
|
||||||
return EGArchitectureImplement.Interface; |
|
||||||
} |
|
||||||
} |
|
||||||
public static class EGThreadExtension |
|
||||||
{ |
|
||||||
public static void ExecuteInMainThread(this Node self, Action action){ |
|
||||||
//action.Invoke(); |
|
||||||
self.NodeModule<EGThread>().ExecuteInMainThread(action); |
|
||||||
} |
|
||||||
|
|
||||||
public static void ExecuteAfterSecond(this Node self, Action action,double delay){ |
|
||||||
self.NodeModule<EGThread>().ExecuteAfterSecond(action,delay); |
|
||||||
} |
|
||||||
|
|
||||||
public static void EGEnabledThread(this Node self){ |
|
||||||
self.NodeModule<EGThread>(); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,39 +0,0 @@ |
|||||||
using System; |
|
||||||
using System.Collections.Generic; |
|
||||||
using System.Data.Common; |
|
||||||
using System.Linq.Expressions; |
|
||||||
|
|
||||||
//ORM Save tools. First support SQLite and MySQL,In future we will support other Database who implement DBConnection. |
|
||||||
namespace EGFramework{ |
|
||||||
public class EGDapper : IEGSave, IEGSaveData |
|
||||||
{ |
|
||||||
/// <summary> |
|
||||||
/// |
|
||||||
/// </summary> |
|
||||||
/// <param name="conn">files conn Str or address ip port,username and passwd</param> |
|
||||||
public void InitSaveFile(string conn) |
|
||||||
{ |
|
||||||
throw new System.NotImplementedException(); |
|
||||||
} |
|
||||||
|
|
||||||
public IEnumerable<TData> FindData<TData>(string dataKey, Expression<Func<TData, bool>> expression) where TData : new() |
|
||||||
{ |
|
||||||
throw new NotImplementedException(); |
|
||||||
} |
|
||||||
|
|
||||||
public IEnumerable<TData> GetAll<TData>(string dataKey) where TData : new() |
|
||||||
{ |
|
||||||
throw new NotImplementedException(); |
|
||||||
} |
|
||||||
|
|
||||||
public TData GetData<TData>(string dataKey, object id) where TData : new() |
|
||||||
{ |
|
||||||
throw new NotImplementedException(); |
|
||||||
} |
|
||||||
|
|
||||||
public void SetData<TData>(string dataKey, TData data, object id) |
|
||||||
{ |
|
||||||
throw new NotImplementedException(); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
Loading…
Reference in new issue