本文整理汇总了C#中StateEnum类的典型用法代码示例。如果您正苦于以下问题:C# StateEnum类的具体用法?C# StateEnum怎么用?C# StateEnum使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StateEnum类属于命名空间,在下文中一共展示了StateEnum类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FormCreator
public FormCreator(ReminderCreator creator)
{
InitializeComponent();
SetText("修改");
var CategoryList = reminder.CategoryList.ToArray();
comboBox1.Items.AddRange(CategoryList);
SetCategory(creator.Category);
comboBox2.SelectedIndex = (int)creator.Importance;
state = StateEnum.Modify;
oldCreator = creator;
textBox1.Text = oldCreator.Title;
textBox2.Text = oldCreator.Text;
textBox3.Text = oldCreator.TimeCode;
timeList = oldCreator.TimeCache;
var builder = new StringBuilder();
foreach (var time in oldCreator.TimeCache)
{
builder.AppendLine(time.ToString("yyyy-MM-dd HH:mm:ss"));
}
if(oldCreator.AllInCache)
{
builder.AppendLine("END");
}
textBox4.Text = builder.ToString();
TimeCodeValid = true;
}
示例2: CastSkill
public void CastSkill(int skillID, Vector3 displacement)
{
var costMP = GetSkillCostMP(skillID, displacement.magnitude);
if (GetSkillTotalCDRemaining(skillID) > 0 || !GetSkillCountEnough(skillID))
{
return;
}
switch (skillID)
{
case 0://跳跃
if (State == StateEnum.Static && Data.mp + 0.1f >= costMP)
{
State = StateEnum.Jumping;
var jumpingTime = MainController.Instance.JumpingTime;
DestinationPosition = transform.localPosition + displacement;
Data.JumpTime = 0;
GetComponent<Rigidbody>().velocity = displacement/jumpingTime -
Vector3.up*0.5f*MainController.JumpingGravity*jumpingTime;
if (Animator)
{
Animator.SetTrigger("Jump");
}
}
break;
}
CmdCastAtkSkill(skillID, displacement);
}
示例3: BluetoothManager
//--------------------------------------------------------------
// CONSTRUCTORS
//--------------------------------------------------------------
public BluetoothManager()
{
_deviceAddress = string.Empty;
_handler = new MyHandler ();
_bluetoothAdapter = BluetoothAdapter.DefaultAdapter;
_state = StateEnum.None;
}
示例4: MyGuiScreenLoadSandbox
public MyGuiScreenLoadSandbox()
: base(new Vector2(0.5f, 0.5f), MyGuiConstants.SCREEN_BACKGROUND_COLOR, new Vector2(0.95f, 0.8f))
{
EnabledBackgroundFade = true;
m_state = StateEnum.ListNeedsReload;
RecreateControls(true);
}
示例5: Init
public void Init(Camera controlCamera)
{
State = StateEnum.Idle;
HideUI();
_controlCamera = controlCamera;
enabled = true;
}
示例6: SocketInfo
public SocketInfo(Socket socket, short headerLength, bool noEncryption)
{
Socket = socket;
State = StateEnum.Header;
NoEncryption = noEncryption;
DataBuffer = new byte[headerLength];
Index = 0;
}
示例7: Stop
public void Stop()
{
_navMeshAgent.Stop();
if (State != StateEnum.Idle)
{
State = StateEnum.Idle;
_animator.SetBool("Running", false);
}
}
示例8: Stop
public void Stop()
{
_rigidbody.velocity = Vector3.zero;
if (State != StateEnum.Idle)
{
State = StateEnum.Idle;
_animator.SetBool("Running", false);
}
}
示例9: WalkTo
public void WalkTo(Vector3 position)
{
_navMeshAgent.Resume();
_navMeshAgent.SetDestination(position);
if (State != StateEnum.Running)
{
State = StateEnum.Running;
_animator.SetBool("Running", true);
}
}
示例10: OnPointerUp
public void OnPointerUp(PointerEventData eventData)
{
CurrentPosition = eventData.position;
State = StateEnum.Idle;
TouchCircle.gameObject.SetActive(false);
TouchSpot.gameObject.SetActive(false);
DragDrop.gameObject.SetActive(false);
OriginalDrop.SetActive(true);
}
示例11: OnPointerDown
public void OnPointerDown(PointerEventData eventData)
{
State = StateEnum.InvalidDragging;
PressPosition = eventData.pressPosition;
CurrentPosition = eventData.position;
var pos = PressPosition * 1800f/Screen.width;
TouchCircle.localPosition = pos;
TouchSpot.localPosition = Vector3.zero;
}
示例12: Pause
IEnumerator Pause()
{
if (pauseKeyPressed)
{
Time.timeScale = 0;
GameState = StateEnum.Pause;
}
yield break;
}
示例13: GetAcition
public AI_Action GetAcition()
{
if (actions.Count == 0)
return new AI_Action();
AI_Action action = actions[0];
actions.RemoveAt(0);
if (actions.Count == 0)
state = StateEnum.Idle;
return action;
}
示例14: OnPointerUp
public void OnPointerUp(PointerEventData eventData)
{
CurrentPosition = eventData.position;
ResetAssistPlaneRotation();
if (_directionWalker) _directionWalker.Stop();
if (_pathfindingWalker) _pathfindingWalker.Stop();
State = StateEnum.Idle;
HideUI();
}
示例15: SensorInit
private void SensorInit(string Id, string State, string Description, float PingInterval)
{
this.Id = Id;
this.State = (StateEnum)Enum.Parse(typeof(StateEnum), State);
this.Description = (Description == null) ? "(None)" : Description;
this.PingInterval = PingInterval;
this.LastMsgSent = null;
this.LastReading = -1;
this.LastReadingTime = string.Empty; // Default Date value, meaning uninitialized
}