generic pool made

This commit is contained in:
Mausham
2025-12-17 15:50:28 -08:00
parent ff062d4c3d
commit 2a7759228f
29 changed files with 265 additions and 227 deletions

View File

@@ -3,15 +3,14 @@ using UnityEngine;
namespace Darkmatter.Domain
{
public class FirstPlatform : IPlatformRule
public class FirstPlatformRule : IPlatformRule
{
public void Execute(IPlatform platform)
{
foreach (var piece in platform.platformPiece)
{
piece.SetActive(true);
piece.GetComponent<Renderer>().material = platform.safeMaterial;
piece.gameObject.SetActive(true);
piece.GetComponent<Renderer>().material = platform.safeMaterial;
piece.tag = "Safe";
}
platform.platformPiece[Random.Range(1, platform.platformPiece.Count)].gameObject.SetActive(false);

View File

@@ -3,16 +3,15 @@ using UnityEngine;
namespace Darkmatter.Domain
{
public class OtherPlatform : IPlatformRule
public class OtherPlatformRule : IPlatformRule
{
int danger = 2;
public void Execute(IPlatform platform)
{
foreach (var piece in platform.platformPiece)
{
piece.SetActive(true);
piece.GetComponent<Renderer>().material = platform.safeMaterial;
piece.gameObject.SetActive(true);
piece.GetComponent<Renderer>().material = platform.safeMaterial;
piece.tag = "Safe";
}