Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
HotItemSpeed.cs
Go to the documentation of this file.
1using Newtonsoft.Json;
2using UnityEngine;
3
4public class HotItemSpeed : HotItem
5{
6 [JsonProperty]
7 public int id;
8
9 public override string Name => "changeSpeed".lang() + " " + id;
10
11 public override string pathSprite => "icon_speed" + id;
12
13 public override string TextTip => null;
14
15 public override bool UseIconForHighlight => true;
16
18
19 public override Sprite GetSprite(bool highlight)
20 {
21 if (!highlight)
22 {
23 return GetSprite();
24 }
26 }
27
28 public override bool ShouldHighlight()
29 {
30 return id == EClass.game.gameSpeedIndex;
31 }
32
33 public override void OnClick(ButtonHotItem b, Hotbar h)
34 {
35 EClass.scene.actionMode.ChangeGameSpeed(id, sound: true);
36 }
37}
void ChangeGameSpeed(int a, bool sound=false)
Definition: ActionMode.cs:1479
List< Sprite > spritesHighlightSpeed
Definition: CoreRef.cs:357
CoreRef refs
Definition: Core.cs:51
Definition: EClass.cs:5
static Game game
Definition: EClass.cs:8
static Scene scene
Definition: EClass.cs:30
static Core core
Definition: EClass.cs:6
int gameSpeedIndex
Definition: Game.cs:223
override string TextTip
Definition: HotItemSpeed.cs:13
override Sprite GetSprite(bool highlight)
Definition: HotItemSpeed.cs:19
override string pathSprite
Definition: HotItemSpeed.cs:11
override string Name
Definition: HotItemSpeed.cs:9
override bool UseIconForHighlight
Definition: HotItemSpeed.cs:15
override bool ShouldHighlight()
Definition: HotItemSpeed.cs:28
override void OnClick(ButtonHotItem b, Hotbar h)
Definition: HotItemSpeed.cs:33
Definition: Hotbar.cs:5
ActionMode actionMode
Definition: Scene.cs:77
virtual Sprite GetSprite()
Definition: UIButton.cs:41