mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
[+] 接入ET8服务端
[+] 接入ET8服务端
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace ET
|
||||
{
|
||||
[ComponentOf(typeof(Unit))]
|
||||
public class MoveComponent: Entity, IAwake, IDestroy
|
||||
{
|
||||
public float3 PreTarget
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Targets[this.N - 1];
|
||||
}
|
||||
}
|
||||
|
||||
public float3 NextTarget
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Targets[this.N];
|
||||
}
|
||||
}
|
||||
|
||||
// 开启移动协程的时间
|
||||
public long BeginTime;
|
||||
|
||||
// 每个点的开始时间
|
||||
public long StartTime { get; set; }
|
||||
|
||||
// 开启移动协程的Unit的位置
|
||||
public float3 StartPos;
|
||||
|
||||
public float3 RealPos
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Targets[0];
|
||||
}
|
||||
}
|
||||
|
||||
private long needTime;
|
||||
|
||||
public long NeedTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.needTime;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.needTime = value;
|
||||
}
|
||||
}
|
||||
|
||||
public long MoveTimer;
|
||||
|
||||
public float Speed; // m/s
|
||||
|
||||
public ETTask<bool> tcs;
|
||||
|
||||
public List<float3> Targets = new List<float3>();
|
||||
|
||||
public float3 FinalTarget
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Targets[this.Targets.Count - 1];
|
||||
}
|
||||
}
|
||||
|
||||
public int N;
|
||||
|
||||
public int TurnTime;
|
||||
|
||||
public bool IsTurnHorizontal;
|
||||
|
||||
public quaternion From;
|
||||
|
||||
public quaternion To;
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 91e6974c200f3e9468684362d1489433
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,15 @@
|
||||
namespace ET
|
||||
{
|
||||
namespace EventType
|
||||
{
|
||||
public struct MoveStart
|
||||
{
|
||||
public Unit Unit;
|
||||
}
|
||||
|
||||
public struct MoveStop
|
||||
{
|
||||
public Unit Unit;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0abfe3cf9ea0c8d41a0afe2920c080bb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user