public DrinkGraphic(TwoClient twoClient, int x, int y, float duration ) { _drinkAnimation = new DrinkAnimation(twoClient,x,y,duration); _twoClient = twoClient; _duration = (long)(duration*10000000); _x = x; _y = y; IsActive = true; }
public TimedDrinkDialog( TwoClient twoClient, float delay, string toSay ) { _twoClient = twoClient; IsPlayer = true; _startButton = new StartDrinkButton(_twoClient, this, -75, -10, _twoClient.Sf, twoClient.ButtonTexture); _closeButton = new CloseDrinkButton(_twoClient, this, -75, 90, _twoClient.Sf, twoClient.ButtonTexture); //_twoClient.SendMessage("DRINKSFORM " + delay); _drinkAnimation = new DrinkAnimation(twoClient, twoClient.WindowWidth / 2 - 215, twoClient.WindowHeight / 2 - 60, delay); IsActive = true; _playerName = _twoClient.PlayerList[_twoClient.PlayerNumber].Name; _dialogText = _twoClient.SplitText(385, toSay); TimeDelay = delay * 10000000;// NORMAL: 10000000; _progBar = new ProgressBar(_twoClient,_twoClient.WindowWidth/2-175,350,twoClient.WindowHeight /2, 15, 2); _bgRect = new CurvedRect(_twoClient, _twoClient.WindowWidth / 2 - 220, 440, _twoClient.WindowHeight / 2 - 40 - (25 * _dialogText.Count), 160 + (25 * _dialogText.Count), Color.LightBlue); OldGameState = twoClient.GameState; twoClient.GameState = 4; }