public MultipleNodeTrackSpinner(EntityData data, Vector2 offset) { this.PauseOnCutscene = data.Bool("pauseOnCutscene"); this.PauseFlag = data.Attr("pauseFlag"); this.HasPauseFlag = !PauseFlag.Equals(""); this.playerDead = false; this.Moving = true; base.Collider = new ColliderList(new Collider[] { new Circle(6f, 0f, 0f), }); base.Add(new PlayerCollider(new Action <Player>(this.OnPlayer), null, null)); this.Path = new Vector2[data.Nodes.GetLength(0) + 1]; this.Path[0] = data.Position + offset; for (int i = 0; i < data.Nodes.GetLength(0); i++) { Path[i + 1] = data.Nodes[i] + offset; } this.MoveTime = data.Float("moveTime", 0.4f); this.PauseTime = data.Float("pauseTime", 0.2f); this.Angle = (this.Path[1] - this.Path[0]).Angle(); this.Percent = 0f; this.CurrentStart = 0; this.UpdatePosition(); }
public static string _GetFriendlyString(this PauseFlag flag) { switch (flag) { case PauseFlag.Pause: return("一時停止"); case PauseFlag.Run: return("稼働"); default: return(""); } }