초기커밋
This commit is contained in:
41
ServerCore/Define/ConstValue.cs
Normal file
41
ServerCore/Define/ConstValue.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace ServerCore
|
||||
{
|
||||
public static class ConstValue
|
||||
{
|
||||
// 비율
|
||||
public static readonly float default_ratio_f = 0.0001f;
|
||||
public static readonly Int64 default_ratio = 10000;
|
||||
public static readonly Int32 default_100_ratio = 100;
|
||||
public static readonly float default_100_ratio_f = 0.01f;
|
||||
|
||||
|
||||
// 시간 단위 (시간단위 기준)
|
||||
public static readonly Int32 default_1_day_to_hour = 24;
|
||||
|
||||
|
||||
// 시간 단위 (초단위 기준)
|
||||
public static readonly Int32 default_1_sec = 1;
|
||||
public static readonly Int32 default_1_min_to_sec = default_1_sec * 60;
|
||||
public static readonly Int32 default_1_hour_to_sec = 60 * default_1_min_to_sec;
|
||||
public static readonly Int32 default_1_day_to_sec = 24 * default_1_hour_to_sec;
|
||||
public static readonly Int32 default_1000_millisec = 1000;
|
||||
public static readonly Int32 default_1_sec_to_milisec = default_1_sec * default_1000_millisec;
|
||||
public static readonly float default_1000_of_sec = 0.001f; // 1000분의 1초
|
||||
public static readonly Int32 default_1000000_microsec = 1000000;
|
||||
public static readonly float default_1000000_of_sec = 0.000001f; // 1백만분의 1초
|
||||
public static readonly Int64 default_1000000000_nanosec = 1000000000;
|
||||
public static readonly double default_1000000000_of_sec = 0.000000001f; // 10억분의 1초
|
||||
|
||||
// 거리 단위
|
||||
public static readonly float default_1000_of_meter = 0.001f; // 1000분의 1미터
|
||||
|
||||
|
||||
}//ConstValues
|
||||
}
|
||||
78
ServerCore/Define/Type.cs
Normal file
78
ServerCore/Define/Type.cs
Normal file
@@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
namespace ServerCore
|
||||
{
|
||||
//=============================================================================================
|
||||
// TimeZone 종류
|
||||
//=============================================================================================
|
||||
public enum TimeZoneType
|
||||
{
|
||||
None = 0,
|
||||
|
||||
Korea = 1, // 한국 지역
|
||||
}
|
||||
|
||||
//=============================================================================================
|
||||
// 위치
|
||||
//=============================================================================================
|
||||
|
||||
public class Position
|
||||
{
|
||||
[JsonProperty("X")]
|
||||
public double X = 0;
|
||||
|
||||
[JsonProperty("Y")]
|
||||
public double Y = 0;
|
||||
|
||||
[JsonProperty("Z")]
|
||||
public double Z = 0;
|
||||
}
|
||||
|
||||
//=============================================================================================
|
||||
// 회전
|
||||
//=============================================================================================
|
||||
public class Rotation
|
||||
{
|
||||
[JsonProperty("Pitch")]
|
||||
public double Pitch = 0;
|
||||
|
||||
[JsonProperty("Yaw")]
|
||||
public double Yaw = 0;
|
||||
|
||||
[JsonProperty("Roll")]
|
||||
public double Roll = 0;
|
||||
}
|
||||
|
||||
//=============================================================================================
|
||||
// 네트워크 주소
|
||||
//=============================================================================================
|
||||
public class NetworkAddress
|
||||
{
|
||||
public string IP { get; set; } = string.Empty;
|
||||
public UInt16 Port { get; set; }
|
||||
|
||||
public void reset()
|
||||
{
|
||||
IP = string.Empty;
|
||||
Port = 0;
|
||||
}
|
||||
|
||||
public bool hasAddress()
|
||||
{
|
||||
if (0 < IP.Length && 0 < Port)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user