/// <summary> /// Constructs a SpeechBubble that follows the given Personnage /// </summary> /// <param name="speaker">Personnage followed by the SpeechBubble</param> public SpeechBubble(Personnage speaker) : base() { Speaker = speaker; Listeners = new List<Personnage>(); Margins = DEFAULT_MARGINS; Box = new VAutoSizeBox(); Box.Position = GetGlobalFromLocal(new Vector2f()); AddWidget(Box); Messages = new List<List<String>>(); MessageLabels = new List<List<Label>>(); CurrentBuiltMessage = 0; LetterTimer = new Timer(); MessageIsCompleted = false; ActionKeyPlayingMode = true; IsLooping = false; IsPlaying = false; StopSpeech(true); }
public MessageBox() : base() { Padding = DEFAULT_PADDING; MainBox = new HAutoSizeBox(); MainBox.Position = GetGlobalFromLocal(new Vector2f()); AddWidget(MainBox); Messages = new List<string>(); MessageBuilder = new MessageBuilder(new MessageBuilder.CInfo( new Vector2f(MAX_WIDTH, MAX_HEIGHT), GameData.DEFAULT_FONT, Label.GetSizeFromESize(DEFAULT_TEXT_SIZE), DEFAULT_TEXT_STYLES)); InteractiveMode = true; CurrentMessageLabel = new Label(null, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_SIZE); CurrentMessageLabel.Style = DEFAULT_TEXT_STYLES; MainBox.AddItem(CurrentMessageLabel, 0, VAlignment.Top); LetterTimer = new Timer(); IsPlaying = false; IsLooping = false; MessageIsCompleted = false; CurrentMessage = 0; CurrentLetter = 0; }
public Animation() : base() { Frames = new List<Texture>(); StopFrame = DEFAULT_STOP_FRAME; CurrentFrame = StopFrame; FrameRate = DEFAULT_FRAME_RATE; LoopState = DEFAULT_LOOP_STATE; IsPlaying = false; Timer = new Timer(); Timer.Start(); }
public Animation(Animation copy) : base(copy) { Frames = new List<Texture>(); foreach (Texture frame in copy.Frames) AddFrame(new Texture(frame)); StopFrame = copy.StopFrame; CurrentFrame = StopFrame; FrameRate = copy.FrameRate; LoopState = copy.LoopState; IsPlaying = false; Timer = new Timer(); Timer.Start(); }
public GameInput(List<Keyboard.Key> keys) { Keys = keys; Timer = new Timer(true); IsDown = false; WasReleased = true; EventIsHandled = false; InputIsHandled = false; }