Exemplo n.º 1
0
        public override IEnumerator UpdateView(FightStatus fightStatus)
        {
            MonoBehaviour monoBehaviour = Main.monoBehaviour;
            List <IEntityWithBoardPresence> removedEntities = m_removedEntities;
            int count = removedEntities.Count;

            for (int i = 0; i < count; i++)
            {
                IEntityWithBoardPresence entity = removedEntities[i];
                MonoBehaviourExtensions.StartCoroutineImmediateSafe(monoBehaviour, RemoveEntityFromBoard(entity), null);
            }
            if (GameStatus.fightType == FightType.BossFight && fightStatus.endReason == FightStatusEndReason.Lose)
            {
                FightMap current = FightMap.current;
                if (null != current)
                {
                    if (fightStatus.TryGetEntity((PlayerStatus p) => p.teamIndex == GameStatus.localPlayerTeamIndex, out PlayerStatus entityStatus))
                    {
                        HeroStatus heroStatus = entityStatus.heroStatus;
                        if (heroStatus != null)
                        {
                            Vector2Int refCoord = heroStatus.area.refCoord;
                            current.AddHeroLostFeedback(refCoord);
                        }
                    }
                    MonoBehaviourExtensions.StartCoroutineImmediateSafe(monoBehaviour, current.ClearMonsterSpawnCells(fightStatus.fightId), null);
                }
            }
            if (fightStatus == FightStatus.local && !GameStatus.hasEnded)
            {
                yield return(DisplayFightResultFeedback(fightStatus));
            }
        }
Exemplo n.º 2
0
 public static void Start()
 {
     if (!s_running)
     {
         s_running = true;
         MonoBehaviourExtensions.StartCoroutineImmediateSafe(Main.monoBehaviour, Run(), null);
     }
 }
Exemplo n.º 3
0
        public static void LethalHit(this IObjectWithArmoredLife objectWithLife, Vector2Int position)
        {
            //IL_0008: Unknown result type (might be due to invalid IL or missing references)
            //IL_000d: Unknown result type (might be due to invalid IL or missing references)
            //IL_001b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0025: Unknown result type (might be due to invalid IL or missing references)
            //IL_0069: Unknown result type (might be due to invalid IL or missing references)
            //IL_007a: Expected O, but got Unknown
            CellObject cellObject = objectWithLife.cellObject;

            if (cellObject.coords != position)
            {
                Log.Warning($"Was not on the specified cell of hit sequence: {cellObject.coords} instead of {position} ({objectWithLife.gameObject.get_name()}).", 49, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Maps\\Objects\\IObjectWithArmoredLife.cs");
                CellObject cellObject2 = cellObject.parentMap.GetCellObject(position.get_x(), position.get_y());
                objectWithLife.SetCellObject(cellObject2);
            }
            MonoBehaviourExtensions.StartCoroutineImmediateSafe(objectWithLife, objectWithLife.PlayLethalHitAnimation(), null);
        }