public void SetParameters(StairParameters param) { stairParameters = param; if (stairParameters.isActive) { meshRenderer.material = GameManager.self.colorManager.MovingStairs[ColorManager.ColorIndex]; } }
StairParameters GetParametersByType(int type, float offsetTpos = 0) { StairParameters stairParameters = new StairParameters(); if (type == 0) { stairParameters.isActive = false; } else if (type == 1) { stairParameters.isActive = true; stairParameters.isIndependent = true; stairParameters.parentIndex = 0; stairParameters.offsetTPos = offsetTpos; stairParameters.movementDistance = 0.5f; stairParameters.movementSpeed = 3; stairParameters.dirOut = true; stairParameters.isSmooth = false; stairParameters.endDelay = 0.2f; stairParameters.startDelay = 0.5f; stairParameters.bothDirectionMovement = false; stairParameters.onlyOutIn = true; } else if (type == 2) { stairParameters.isActive = true; stairParameters.isIndependent = true; stairParameters.parentIndex = 0; stairParameters.offsetTPos = offsetTpos; stairParameters.movementDistance = 0.5f; stairParameters.movementSpeed = 3; stairParameters.dirOut = true; stairParameters.isSmooth = false; stairParameters.endDelay = 0.2f; stairParameters.startDelay = 0.5f; stairParameters.bothDirectionMovement = false; stairParameters.onlyOutIn = false; } else if (type == 3) { stairParameters.isActive = true; stairParameters.isIndependent = true; stairParameters.parentIndex = 0; stairParameters.offsetTPos = offsetTpos; stairParameters.movementDistance = 0.4f; stairParameters.movementSpeed = 1; stairParameters.dirOut = false; stairParameters.isSmooth = true; stairParameters.endDelay = 0.2f; stairParameters.startDelay = 0.2f; stairParameters.bothDirectionMovement = true; } else if (type == 4) { stairParameters.hasObstacle = true; stairParameters.isActive = false; stairParameters.isIndependent = true; stairParameters.parentIndex = 0; stairParameters.offsetTPos = offsetTpos; stairParameters.movementDistance = 75; stairParameters.movementSpeed = 2; stairParameters.dirOut = false; stairParameters.isSmooth = true; stairParameters.endDelay = 0f; stairParameters.startDelay = 0f; stairParameters.bothDirectionMovement = true; } return(stairParameters); }