void Start() { activateState = ActivateState.OFF; switchState = SwitchState.OFF; swapped = false; swappedTimer = .05f; }
void ObjectDeactivate() { activateState = ActivateState.OFF; if (offMaterial != null) { gameObject.renderer.material = offMaterial; } }
// Use this for initialization void Start() { //animation.Stop(); activateState = ActivateState.OFF; //animation.wrapMode = WrapMode.Once; //GetComponent<Animator>().SetBool("Rise",true); anim = GetComponent <Animator>(); }
void ObjectActivate() { activateState = ActivateState.ON; if (onMaterial != null) { gameObject.renderer.material = onMaterial; } }
// Use this for initialization void Start() { lineRenderer = GetComponent <LineRenderer> (); lineRenderer.SetWidth(laserWidth, laserWidth); myTransform = transform; offset = new Vector3(0, 0, 0); endEffect = GetComponentInChildren <ParticleSystem> (); if (endEffect) { endEffectTransform = endEffect.transform; } laserTimer = 0; offTimer = 0; activateState = ActivateState.OFF; }
void OnTriggerEnter(Collider other) { if (other.tag == "Player") { foreach (GameObject obj in activatedSwitches) { obj.SendMessage("ObjectActivate", SendMessageOptions.DontRequireReceiver); } switchState = SwitchState.ON; } if (other.tag == "Clone") { foreach (GameObject obj in activatedSwitches) { obj.SendMessage("ObjectActivate", SendMessageOptions.DontRequireReceiver); } switchState = SwitchState.ON; } foreach (GameObject obj in activatedSwitches) { SwitchState s1State = switchState; SwitchState s2State = obj.GetComponent <DualSwitches> ().switchState; ActivateState a1State = activateState; ActivateState a2State = obj.GetComponent <DualSwitches> ().activateState; if (s1State == SwitchState.ON && s2State == SwitchState.ON && a1State == ActivateState.ON && a2State == ActivateState.ON) { foreach (GameObject obj2 in activatedObjects) { obj2.SendMessage("ObjectActivate", SendMessageOptions.DontRequireReceiver); } } } }
void ObjectDeactivate() { activateState = ActivateState.OFF; }
void ObjectActivate() { activateState = ActivateState.ON; }
// Use this for initialization void Start() { activateState = ActivateState.OFF; }
void ObjectActivate() { activateState = ActivateState.ON; Debug.Log("Whiteboard is active"); }
// Use this for initialization void Start() { activateState = ActivateState.OFF; startPosition = transform.position; StartCoroutine(MoveOverTime()); }
// Use this for initialization void Start() { renderer.enabled = false; activateState = ActivateState.OFF; }
void ObjectDeactivate() { activateState = ActivateState.OFF; GetComponent <Animator>().SetBool("Rise", false); }
void ObjectActivate() { activateState = ActivateState.ON; GetComponent <Animator>().SetBool("Rise", true); }