generic pool made
This commit is contained in:
@@ -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);
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user