本文整理汇总了C#中Status类的典型用法代码示例。如果您正苦于以下问题:C# Status类的具体用法?C# Status怎么用?C# Status使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Status类属于命名空间,在下文中一共展示了Status类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReAutoTarget
public void ReAutoTarget()
{
// 타겟을 재 탐색합니다.
mMonsterCount -= 1;
TargetMonster = null;
if(mMonsterCount == 0)
{
// 몬스터를 모두 클리어 하였습니다.
Debug.Log ("Clear");
mLoopCount -= 1;
// 모든 공격과 스텝을 중지시킵니다.
StopCoroutine("ArcherAttack");
StopCoroutine("MonsterAttack");
StopCoroutine("AutoStep");
if(mLoopCount == 0)
{
// 모든 스테이지가 클리어 되었습니다.
Debug.Log("Stage All Clear");
GameOver();
return;
}
// 던전 스텝을 초기화 시키고 다시 순환 시킵니다.
mStatus = Status.Idle;
StartCoroutine("AutoStep");
return;
}
// 타겟 재 탐색
GetAutoTarget();
}
示例2: Get
/// <summary>
/// 指定したツイートを起点とした会話ツリーを取得します。
/// </summary>
/// <param name="root"></param>
/// <returns></returns>
public StatusCollection Get(Status root)
{
return this.DoReadLockAction(() =>
{
var list = new List<Status> { root };
var current = root;
// 起点より古いツイートの抽出 (in_reply_to を辿っていく)
while (current.DisplayStatus.InReplyToStatusId.HasValue)
{
Status next;
if (this.statuses.TryGetValue(current.DisplayStatus.InReplyToStatusId.Value, out next))
{
list.Add(next);
current = next;
}
else break;
}
// 起点より新しいツイートの抽出 (ReplyFrom を使って逆方向へ辿る (再帰でツリーすべてをさらう感じ))
Action<Status> recursion = null;
recursion = status =>
{
status.DisplayStatus.ReplyFrom.ForEach(s => recursion(s));
list.Add(status);
};
recursion(root);
return new StatusCollection(list.OrderByDescending(s => s.Id));
});
}
示例3: SetStatus
//상테와 파라메터를 통해 아처의 상태를 컨트롤 합니다.
public void SetStatus(Status status)
{
//animator 에서 만든 상태 간 전이를 상황에 맞게 호출 한다.
switch (status) {
case Status.Idle:
mAnimator.SetTrigger("Idle");
Debug.Log("idle---");
break;
case Status.Attack:
mAnimator.SetTrigger("Basic_Attack");
Debug.Log("Attack---");
break;
case Status.Dead:
mAnimator.SetTrigger("Dead");
Debug.Log("Die---");
break;
case Status.Damaged:
mAnimator.SetTrigger("Damaged");
Debug.Log("Damage---");
break;
case Status.UseSkill:
mAnimator.SetTrigger("Skill01");
Debug.Log("Skill---");
break;
}
}
示例4: OnUploadData
async private void OnUploadData()
{
IsUploading = true;
await UploadData(Name);
IsUploading = false;
Status = Status.Uploaded;
}
示例5: UpdateBehavior
private void UpdateBehavior(Status ks)
{
if (Location.X < 0)
Kill();
if (Location.X > ks.Map.Width * 16 - 16)
Kill();
if (Location.Y < 0)
{
Velocity.Y = 0;
Location.Y = 0;
}
if (Location.Y > ks.Map.Height * 16)
Kill(true, false);
foreach (EntityLiving e in new List<Entity>(Parent.FindEntitiesByType<EntityLiving>()))
if (!e.IsDying && (e.MyGroup == EntityGroup.Enemy) &&
new RectangleF(Location, Size).CheckCollision(new RectangleF(e.Location, e.Size)))
{
e.Kill();
Kill();
}
if (Life < 1)
Kill();
if (CollisionBottom() == ObjectHitFlag.Hit)
{
Velocity.Y = -2.5f;
Life--;
}
if ((CollisionLeft() == ObjectHitFlag.Hit) || (CollisionRight() == ObjectHitFlag.Hit))
Kill();
}
示例6: GetStatus
public Status GetStatus()
{
HttpClient client = new HttpClient();
if (Key == null)
{
throw new Exception("Captcha.GetStatus: Key is null");
}
if (CaptchaID == null)
{
throw new Exception("Captcha.GetStatus: CaptchaID is null");
}
string resp=client.DownloadString("http://antigate.com/res.php?key="+
Key+"&action=get&id="+CaptchaID.ToString());
if (resp.Contains("CAPCHA_NOT_READY"))
{
CaptchaStatus = Status.NotReady;
return Status.NotReady;
}
if(resp.Substring(0,2)=="OK")
{
CaptchaText = resp.Substring(3);
CaptchaStatus=Status.Success;
return Status.Success;
}
CaptchaStatus=Status.Error;
return Status.Error;
}
示例7: BlockObject
public BlockObject(Transform block,float width,float height)
{
this.block =block;
this.status = Status.Active;
this.width = width;
this.height = height;
}
示例8: LateBoundTypeFailure
public static void LateBoundTypeFailure(IStatusAppender s, string originalString, Exception ex)
{
Component component = typeof(RuntimeWarning).Assembly.AsComponent();
Status status = new Status(
component, SR.LateBoundTypeFailure(originalString), ex, FileLocation.Empty);
s.Append(status);
}
示例9: CachedGameAction
/// <summary>
/// For serialisation.
/// </summary>
/// <param name="gameStatus"></param>
/// <param name="teamId"></param>
/// <param name="actionPoint"></param>
public CachedGameAction(Status gameStatus, int teamId, Point actionPoint)
{
TeamId = teamId;
ActionPoint = actionPoint;
GameStatus = gameStatus;
ThrowRoom = new Rectangle(0, 0, 0, 0);
}
示例10: Udp
public Udp(Status status, string hostName, string ipAddress, int port)
{
Status = status;
HostName = hostName;
Endpoint = new IPEndPoint(IPAddress.Parse(ipAddress), port);
}
示例11: OnEnable
/// <summary>
/// Internal Unity method.
/// This method is called whenever the object is enabled/re-enabled.
/// Initializes all local variables which are frequently used.
/// Always check so that the variables are valid at start, so I don't have to later.
/// "GameObject.FindObjectOfType" method is kind of expensive and should be used as sparingly as possible.
/// </summary>
void OnEnable()
{
if(m_transformComponent == null)
m_transformComponent = this.GetComponent<Transform>();
m_sphereMovementStatus = Status.Idle;
}
示例12: DoWalkOrClimb
private void DoWalkOrClimb(string tag)
{
switch (tag)
{
case "Up":
TimeToWait = Consts.WalkTime;
TimeSwitchs.GetInput = true;
PlayerStatus = Status.Climb;
PlayerAnimator.SetTrigger("Climb");
PlayerRigibody.velocity = new Vector2(0, Consts.MoveSpeed);
break;
case "Down":
TimeToWait = Consts.WalkTime;
TimeSwitchs.GetInput = true;
PlayerStatus = Status.Climb;
PlayerAnimator.SetTrigger("Climb");
PlayerRigibody.velocity = new Vector2(0, -Consts.MoveSpeed);
break;
case "Left":
TimeToWait = Consts.WalkTime;
TimeSwitchs.GetInput = true;
PlayerStatus = Status.Walk;
PlayerAnimator.SetTrigger("Walk");
PlayerRigibody.velocity = new Vector2(-Consts.MoveSpeed, 0f);
break;
case "Right":
TimeToWait = Consts.WalkTime;
TimeSwitchs.GetInput = true;
PlayerStatus = Status.Walk;
PlayerAnimator.SetTrigger("Walk");
GetComponent<Rigidbody2D>().velocity = new Vector2(Consts.MoveSpeed, 0f);
break;
}
}
示例13: Worker
/// <summary>Initialize a new worker with the specified action.
/// </summary>
/// <param name="actionName">The action name.</param>
/// <param name="action">The action to run by the worker.</param>
public Worker(string actionName, Action action)
{
_actionName = actionName;
_action = action;
_status = Status.Initial;
_logger = ObjectContainer.Resolve<ILoggerFactory>().Create(GetType().FullName);
}
示例14: SetUp
public new void SetUp()
{
_status = SingletonProvider<TestSetup>.Instance.GetApp().Status;
string logFile = _settings.Logging.CurrentDefaultLog;
if (File.Exists(logFile))
File.Delete(logFile);
}
示例15: Specification
public Specification(string name, Result result)
{
_status = result.Status;
_exception = result.Exception;
_supplements = result.Supplements;
_name = name;
}