using Darkmatter.Core; using UnityEngine; namespace Darkmatter.Domain { public class FirstPlatform : IPlatformRule { public void Execute(IPlatform platform) { foreach (var piece in platform.platformPiece) { piece.SetActive(true); piece.GetComponent().material = platform.safeMaterial; piece.gameObject.SetActive(true); piece.tag = "Safe"; } platform.platformPiece[Random.Range(1, platform.platformPiece.Count)].gameObject.SetActive(false); } } }