public static FloorMechanismObject CreateFloorMechanismObject(FloorMechanismDefinition definition, int x, int y)
        {
            //IL_0067: Unknown result type (might be due to invalid IL or missing references)
            //IL_006c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0082: Unknown result type (might be due to invalid IL or missing references)
            //IL_0083: Unknown result type (might be due to invalid IL or missing references)
            if (null == s_instance)
            {
                Log.Error("CreateFloorMechanismObject called while the factory is not ready.", 322, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\FightObjectFactory.cs");
                return(null);
            }
            if (!FightMap.current.TryGetCellObject(x, y, out CellObject cellObject))
            {
                Log.Error(string.Format("{0} called with an invalid position {1}, {2}.", "CreateFloorMechanismObject", x, y), 331, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\FightObjectFactory.cs");
                return(null);
            }
            Transform transform = cellObject.get_transform();
            Vector3   position  = transform.get_position();

            position.y += 0.5f;
            FloorMechanismObject component = s_floorMechanismCharacterPool.Instantiate(position, Quaternion.get_identity(), transform).GetComponent <FloorMechanismObject>();

            component.InitializeDefinitionAndArea(definition, x, y);
            component.SetCellObject(cellObject);
            return(component);
        }
 public static void ReleaseFloorMechanismObject([NotNull] FloorMechanismObject instance)
 {
     if (s_floorMechanismCharacterPool != null)
     {
         s_floorMechanismCharacterPool.Release(instance.get_gameObject());
     }
 }
        public static IEnumerator CreateFloorMechanismObject(FightStatus fightStatus, FloorMechanismStatus floorMechanismStatus, PlayerStatus ownerStatus, int x, int y)
        {
            FloorMechanismDefinition floorMechanismDefinition = (FloorMechanismDefinition)floorMechanismStatus.definition;

            if (!(null == floorMechanismDefinition))
            {
                FloorMechanismObject floorMechanismObject = FightObjectFactory.CreateFloorMechanismObject(floorMechanismDefinition, x, y);
                if (!(null == floorMechanismObject))
                {
                    floorMechanismStatus.view = floorMechanismObject;
                    floorMechanismObject.alliedWithLocalPlayer = (GameStatus.localPlayerTeamIndex == floorMechanismStatus.teamIndex);
                    yield return(floorMechanismObject.LoadAnimationDefinitions(floorMechanismDefinition.defaultSkin.value));

                    floorMechanismObject.Initialize(fightStatus, ownerStatus, floorMechanismStatus);
                    yield return(floorMechanismObject.Spawn());
                }
            }
        }