private void Awake() { ws = new WaitForSeconds(judgeTime); fov = GetComponent <EnemyFOV>(); move = GetComponent <EnemyMove>(); attack = GetComponent <EnemyAttack>(); //이렇게 하면 자기한테 맞는 Attack 이 가져와져 _status = GetComponentInChildren <StatusAnimation>(); //자식에 달려있는 상태 }
/// <summary>Ends the animation on the status bar.</summary> public async Task EndAnimationAsync(StatusAnimation animation) { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); try { IVsStatusbar statusBar = await GetServiceAsync(); statusBar.FreezeOutput(0); statusBar.Animation(0, animation); statusBar.FreezeOutput(1); } catch (Exception ex) { await ex.LogAsync(); } }
public static async Task EndAnimationAsync(StatusAnimation animation) { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); try { IVsStatusbar statusBar = await GetServiceAsync(); statusBar.FreezeOutput(0); statusBar.Animation(0, animation); statusBar.FreezeOutput(1); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex); } }
/// <summary>Ends the animation on the status bar.</summary> public async Task EndAnimationAsync(StatusAnimation animation) { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); try { IVsStatusbar statusBar = await VS.Services.GetStatusBarAsync(); object icon = (short)animation; statusBar.FreezeOutput(0); statusBar.Animation(0, ref icon); statusBar.FreezeOutput(1); } catch (Exception ex) { await ex.LogAsync(); } }
/// <summary> /// Load a given animation graphic, and start animating /// </summary> public void SetAnimation(StatusAnimation anim) { currentFrame = 0; totalFrames = 2; // awk switch (anim) { case StatusAnimation.Amnesia: activeGraphic = amnesiaGraphic; break; case StatusAnimation.Mute: activeGraphic = muteGraphic; break; case StatusAnimation.Poison: activeGraphic = psnGraphic; break; case StatusAnimation.Sleep: totalFrames = 4; activeGraphic = slpGraphic; break; case StatusAnimation.Curse: activeGraphic = curseGraphic; break; case StatusAnimation.Blind: activeGraphic = blndGraphic; break; case StatusAnimation.Paralysis: activeGraphic = paraGraphic; break; default: Debug.WriteLine("Uncaught status animation: " + anim.ToString()); break; } }