コード例 #1
0
 private void OnMovementConfirmed(MovementConfirmed obj)
 {
     if (_isFriendlyTurn)
     {
         Sound.SoundEffect("SFX/button-press-1.wav", DefaultVolume).Play();
     }
 }
コード例 #2
0
 private void OnMovementConfirmed(MovementConfirmed e)
 {
     _shouldCheckMouse      = false;
     _availableMoves        = Empty;
     _lastPointOver         = e.Path.First();
     _currentPathTransforms = new List <Transform2>(0);
 }
コード例 #3
0
        private void OnMovementConfirmed(MovementConfirmed e)
        {
            var destination = e.Path.Last();

            if (GameWorld.CurrentCharacter.Team != Team.Friendly && !GameWorld.FriendlyPerception.ContainsKey(destination))
            {
                return;
            }

            var visuals  = new List <IVisual>();
            var automata = new List <IAutomaton>();

            visuals.Add(new UiImage
            {
                Image     = "Effects/Cover_Gray",
                Transform = GameWorld.Map.TileToWorldTransform(destination).WithSize(TileData.RenderSize),
                Tint      = UiColors.AvailableMovesView_Rectangles
            });
            var anim = new TileRotatingEdgesAnim(destination, Color.FromNonPremultiplied(110, 170, 255, 255)).Initialized();

            visuals.Add(anim);
            automata.Add(anim);
            _visuals  = visuals;
            _automata = automata;
        }
コード例 #4
0
 internal void Notify(MovementConfirmed movement)
 {
     Body.Path           = new Queue <Point>(movement.Path.Skip(1).ToList());
     Body.ShouldContinue = true;
     if (!Body.Path.Any())
     {
         EventQueue.Instance.Add(new MovementFinished());
     }
 }
コード例 #5
0
        private void Map_MovementConfirmed(object sender, MovementConfirmed e)
        {
            _account.Character.Map.MovementConfirmed -= Map_MovementConfirmed;
            _cellMovement = null;

            if (!e.Status)
            {
                OnChangementFinished(false);
                return;
            }

            _account.Character.Map.MapChanged += Map_MapChanged;
            Console.WriteLine($"Sending ChangeMapMessage");
            Task.Delay(150).ContinueWith(t =>
                                         _account.Network.SendToServer(new ChangeMapMessage(NewMap, false))
                                         );
        }
コード例 #6
0
 private void OnMovementConfirmed()
 {
     MovementConfirmed?.Invoke(_account, null);
 }
コード例 #7
0
 private void OnMovementConfirmed(MovementConfirmed e) => GameWorld.CurrentCharacter.Notify(e);
コード例 #8
0
 private void OnMovementConfirmed(MovementConfirmed e)
 {
     _visuals = new List <IVisual>();
 }
コード例 #9
0
ファイル: Map.cs プロジェクト: Teles1/Cookie
 private void OnMovementConfirmed()
 {
     MovementConfirmed?.Invoke(_account, new MovementConfirmed(true));
     _account.Character.Status = CharacterStatus.None;
 }