public void OnStart() { CMeshRenderer mesh = gameObject.RequireComponent <CMeshRenderer>(); mesh.setEnabled(false); GameObject room = GameObject.GetGameObjectByName(_name); PuzzleBEnvironmentController envScript = GetScript <PuzzleBEnvironmentController>(room); envScript.AddSpawnZone(_region, this); _transform = gameObject.RequireComponent <CTransform>(); Vector3 pos = _transform.GetPosition(CTransform.TransformSpace.GLOBAL); Vector3 scale = _transform.scale; position = _transform.GetPosition(CTransform.TransformSpace.GLOBAL); minZ = pos.Z - scale.Z * 0.5f; maxZ = pos.Z + scale.Z * 0.5f; minX = pos.X - scale.X * 0.5f; maxX = pos.X + scale.X * 0.5f; y = pos.Y; }
public void OnStart() { transform = gameObject.transform; pos = transform.GetPosition(CTransform.TransformSpace.GLOBAL); newPos = pos; if (riseAmt != 0.0f || timer != 0.0f) { countDown = timer; } }