public void AddPlatform(Block block) { //Get the platform from sleeping or create a new one. GameObject platform = sleepingPlatforms.Count > 0 ? GetSleepingFrom(sleepingPlatforms) : FactoryAddon.CreatePlatform(); //Add to active and set to active. activePlatforms.AddLast(platform); //Add the position and the scale. platform.transform.position = block.GetPosition(); platform.transform.localScale = block.GetScale(); }