コード例 #1
0
ファイル: BossBar.cs プロジェクト: BartMartner/SecretGame
 private void Awake()
 {
     instance = this;
     innerBar.type = Image.Type.Filled;
     innerBar.fillMethod = Image.FillMethod.Horizontal;
     gameObject.SetActive(false);
 }
コード例 #2
0
ファイル: WorldCommands.cs プロジェクト: Vilder50/SharpCraft
 /// <summary>
 /// Gets the specified <see cref="SharpCraft.BossBar"/>'s visibility value
 /// </summary>
 /// <param name="bossBar">the <see cref="SharpCraft.BossBar"/> to get from</param>
 public void GetVisible(BossBar bossBar)
 {
     ForFunction.AddCommand(new BossBarGetValueCommand(bossBar, ID.BossBarValue.visible));
 }
コード例 #3
0
ファイル: WorldCommands.cs プロジェクト: Vilder50/SharpCraft
 /// <summary>
 /// Gets the specified <see cref="SharpCraft.BossBar"/>'s max value
 /// </summary>
 /// <param name="bossBar">the <see cref="SharpCraft.BossBar"/> to get from</param>
 public void GetMax(BossBar bossBar)
 {
     ForFunction.AddCommand(new BossBarGetValueCommand(bossBar, ID.BossBarValue.max));
 }
コード例 #4
0
ファイル: WorldCommands.cs プロジェクト: Vilder50/SharpCraft
 /// <summary>
 /// Makes the selected players see the specified <see cref="SharpCraft.BossBar"/>
 /// </summary>
 /// <param name="bossBar">the <see cref="SharpCraft.BossBar"/> to show</param>
 /// <param name="players">the <see cref="BaseSelector"/> to use</param>
 public void SetPlayers(BossBar bossBar, BaseSelector players)
 {
     ForFunction.AddCommand(new BossBarChangePlayersCommand(bossBar, players));
 }
コード例 #5
0
ファイル: WorldCommands.cs プロジェクト: Vilder50/SharpCraft
 /// <summary>
 /// Changes the color of the specified <see cref="SharpCraft.BossBar"/>
 /// </summary>
 /// <param name="bossBar">the <see cref="SharpCraft.BossBar"/> to change</param>
 /// <param name="color">the new color</param>
 public void SetColor(BossBar bossBar, ID.BossBarColor color)
 {
     ForFunction.AddCommand(new BossBarChangeColorCommand(bossBar, color));
 }
コード例 #6
0
ファイル: WorldCommands.cs プロジェクト: Vilder50/SharpCraft
 /// <summary>
 /// Changes the style of the specified <see cref="SharpCraft.BossBar"/>
 /// </summary>
 /// <param name="bossBar">the <see cref="SharpCraft.BossBar"/> to change</param>
 /// <param name="style">the new style of the <see cref="SharpCraft.BossBar"/></param>
 public void SetStyle(BossBar bossBar, ID.BossBarStyle style)
 {
     ForFunction.AddCommand(new BossBarChangeStyleCommand(bossBar, style));
 }
コード例 #7
0
ファイル: WorldCommands.cs プロジェクト: Vilder50/SharpCraft
 /// <summary>
 /// Changes if the specified <see cref="SharpCraft.BossBar"/> is visible
 /// </summary>
 /// <param name="bossBar">the <see cref="SharpCraft.BossBar"/> to change</param>
 /// <param name="visible">If it should be visible or not</param>
 public void SetVisible(BossBar bossBar, bool visible)
 {
     ForFunction.AddCommand(new BossBarChangeVisibilityCommand(bossBar, visible));
 }
コード例 #8
0
 private void InvokeBossBar(BossBar packet)
 {
     packetListener.OnBossBar(packet);
 }
コード例 #9
0
ファイル: WorldCommands.cs プロジェクト: Vilder50/SharpCraft
 /// <summary>
 /// Sets the maximum value the specified <see cref="SharpCraft.BossBar"/> can display
 /// </summary>
 /// <param name="bossBar">the <see cref="SharpCraft.BossBar"/> to change</param>
 /// <param name="setTo">the new max value</param>
 public void SetMax(BossBar bossBar, int setTo)
 {
     ForFunction.AddCommand(new BossBarChangeMaxValueCommand(bossBar, setTo));
 }
コード例 #10
0
ファイル: WorldCommands.cs プロジェクト: Vilder50/SharpCraft
 /// <summary>
 /// Removes the specified <see cref="SharpCraft.BossBar"/> from the world
 /// </summary>
 /// <param name="removeThis">the <see cref="SharpCraft.BossBar"/> to remove</param>
 public void Remove(BossBar removeThis)
 {
     ForFunction.AddCommand(new BossBarRemoveCommand(removeThis));
 }
コード例 #11
0
 /// <summary>
 /// Intializes a new <see cref="BossBarGetValueCommand"/>
 /// </summary>
 /// <param name="bossBar">The boss bar to the value from</param>
 /// <param name="getValue">The value to get from the boss bar</param>
 public BossBarGetValueCommand(BossBar bossBar, ID.BossBarValue getValue)
 {
     BossBar  = bossBar;
     GetValue = getValue;
 }
コード例 #12
0
 /// <summary>
 /// Intializes a new <see cref="BossBarAddCommand"/>
 /// </summary>
 /// <param name="bossBar">The boss bar to add</param>
 /// <param name="name">The shown name of the boss bar</param>
 public BossBarAddCommand(BossBar bossBar, BaseJsonText name)
 {
     BossBar = bossBar;
     Name    = name;
 }
コード例 #13
0
ファイル: BossBar.cs プロジェクト: BasicLich/MIZJAM-1
 private void Awake()
 {
     instance = this;
 }
コード例 #14
0
 public void OnBossBar(BossBar packet)
 {
 }
コード例 #15
0
ファイル: BossBar.cs プロジェクト: BartMartner/SecretGame
 public void OnDestroy()
 {
     instance = null;
 }
コード例 #16
0
ファイル: WorldCommands.cs プロジェクト: Vilder50/SharpCraft
 /// <summary>
 /// Changes the specified <see cref="SharpCraft.BossBar"/>'s display name
 /// </summary>
 /// <param name="bossBar">the <see cref="SharpCraft.BossBar"/> to change</param>
 /// <param name="newName">the new display name for the bar</param>
 public void SetName(BossBar bossBar, BaseJsonText newName)
 {
     ForFunction.AddCommand(new BossBarChangeNameCommand(bossBar, newName));
 }
コード例 #17
0
 /// <summary>
 /// Intializes a new <see cref="ExecuteStoreBossbar"/> command
 /// </summary>
 /// <param name="bossbar">The <see cref="BossBar"/> to store the result in</param>
 /// <param name="storeAsValue">True if it should store it as the bossbar's value. False if it should store it as it's max value</param>
 /// <param name="storeResult">True if it should store the result. False if it should store success</param>
 public ExecuteStoreBossbar(BossBar bossbar, bool storeAsValue, bool storeResult = true) : base(storeResult)
 {
     Bossbar      = bossbar;
     StoreAsValue = storeAsValue;
 }