public ActivateArtifactState() { foundMonument = false; buttonPressed = false; artifactAssembled = false; artifactActivator = GameManager.GetArtifactActivator(); findMonumentTrigger = artifactActivator.GetComponentInChildren <StateTrigger>().gameObject.GetComponent <BoxCollider>(); findMonumentTrigger.enabled = true; artifactPieces = GameObject.FindGameObjectsWithTag("ArtifactPieceActivator"); button = artifactActivator.GetComponentInChildren <ArtifactButton>(); button.SetState(this); pickupArtifactTrigger = artifactActivator.GetComponentInChildren <InteractionTrigger>(); pickupArtifactTrigger.SetObserver(this); //Calculate centroid artifactPosition = new Vector3( (artifactPieces[0].transform.parent.position.x + artifactPieces[1].transform.parent.position.x + artifactPieces[2].transform.parent.position.x) / 3, (artifactPieces[0].transform.parent.position.y + artifactPieces[1].transform.parent.position.y + artifactPieces[2].transform.parent.position.y) / 3 + 2f, (artifactPieces[0].transform.parent.position.z + artifactPieces[1].transform.parent.position.z + artifactPieces[2].transform.parent.position.z) / 3); artifactRotation = Quaternion.Euler(0f, 90f, 0f); //Save initial transform for (int i = 0; i < artifactPieces.Length; i++) { artifactStartPositions.Add(artifactPieces[i].transform.position); artifactStartRotations.Add(artifactPieces[i].transform.rotation); artifactPillars.Add(new ArtifactPillar(artifactPieces[i].transform.parent.gameObject, i, this)); } }
void Start() { interactionTrigger.SetObserver(this); targetRotation = Quaternion.Euler(new Vector3(0f, 0f, 0f)); canReward = false; interactionTrigger.gameObject.SetActive(false); }
void Start() { interactionTrigger.SetObserver(this); isPlayerInteracting = false; isPuzzleComplete = false; playerCancelled = false; initialRotation = appleOfEden.transform.rotation; }
public ArtifactPillar(GameObject pillar, int pieceID, ActivateArtifactState artifactState) { placePieceTrigger = pillar.GetComponentInChildren <InteractionTrigger>(); placePieceTrigger.SetObserver(this); placePieceTrigger.gameObject.GetComponent <BoxCollider>().enabled = true; material = pillar.GetComponent <Renderer>().materials[2]; id = pieceID; state = artifactState; }
void Start() { interactionTrigger.SetObserver(this); isPlayerInteracting = false; isPuzzleComplete = false; playerCancelled = false; tooltipTimeCounter = tooltipTime; inputCoroutine = null; glowShader = Shader.Find("MK/Glow/Selective/Standard"); }
void Start() { interactionTrigger.SetObserver(this); tooltipCoroutine = null; isPuzzleComplete = false; currentColor = Color.black; matchingSurfaceRenderer.material.SetColor("_EmissionColor", matchingColor * emissionIntensity); InitCanister(redCanisterFluid, Color.red); InitCanister(greenCanisterFluid, Color.green); InitCanister(blueCanisterFluid, Color.blue); initialCanisterScale = redCanisterFluid.transform.localScale.y; initialCanisterPosition = redCanisterFluid.transform.localPosition.y; ClampCurrentColor(); UpdateWithCurrentColor(); }
void Start() { interactionTrigger.SetObserver(this); }