Пример #1
0
 public void SelectHero(HeroSummarySocket socket)
 {
     teamManagement.SelectHero(((HeroSummary)socket.content).hero);
     if (selectedEffect == null)
     {
         selectedEffect = new SelectedEffect(socket.x + HeroSummary.WIDTH / 2, socket.y - 2, 10);
         topEffectLayer.elements.Add(selectedEffect);
     }
     else
     {
         selectedEffect.x = socket.x + HeroSummary.WIDTH / 2;
         selectedEffect.y = socket.y - 2;
     }
 }
Пример #2
0
 private void SetSelectedEffect(FighterObject fighterObject)
 {
     if (fighterObject == null)
     {
         return;
     }
     if (selectedEffect == null)
     {
         selectedEffect = new SelectedEffect(fighterObject.x - Global.camera.x,
                                             fighterObject.y - (int)fighterObject.fighter.sprite.origin.Y - Global.camera.y - 30, 10);
         topEffectLayer.elements.Add(selectedEffect);
     }
     else
     {
         selectedEffect.x = fighterObject.x - Global.camera.x;
         selectedEffect.y = fighterObject.y - (int)fighterObject.fighter.sprite.origin.Y - Global.camera.y - 30;
     }
 }
Пример #3
0
        // Order : SummonFighterObject -> RemoveDeadFighters -> CheckBattleFinished -> UpdateFigherObjectLocations

        private void UpdateFighterObjectLocations()
        {
            selectedEffect?.Finish();
            selectedEffect = null;

            SetFighterGroupMatrix();

            if (SetFighterObjects())
            {
                Timer       timer = new Timer(20);
                TaskManager task  = new TaskManager(timer);
                topEffectLayer.elements.Add(timer);
                task.TaskFinished += (t) => { RestartTime(); };
                task.StartTask();
                return;
            }
            RestartTime();
        }
Пример #4
0
 public void DeselectHero()
 {
     teamManagement.DeselectHero();
     selectedEffect?.Finish();
     selectedEffect = null;
 }