Exemplo n.º 1
0
 void Start()
 {
     activateState = ActivateState.OFF;
     switchState   = SwitchState.OFF;
     swapped       = false;
     swappedTimer  = .05f;
 }
Exemplo n.º 2
0
 void ObjectDeactivate()
 {
     activateState = ActivateState.OFF;
     if (offMaterial != null)
     {
         gameObject.renderer.material = offMaterial;
     }
 }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     //animation.Stop();
     activateState = ActivateState.OFF;
     //animation.wrapMode = WrapMode.Once;
     //GetComponent<Animator>().SetBool("Rise",true);
     anim = GetComponent <Animator>();
 }
Exemplo n.º 4
0
 void ObjectActivate()
 {
     activateState = ActivateState.ON;
     if (onMaterial != null)
     {
         gameObject.renderer.material = onMaterial;
     }
 }
Exemplo n.º 5
0
    // 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;
    }
Exemplo n.º 6
0
    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);
                }
            }
        }
    }
Exemplo n.º 7
0
 void ObjectDeactivate()
 {
     activateState = ActivateState.OFF;
 }
Exemplo n.º 8
0
 void ObjectActivate()
 {
     activateState = ActivateState.ON;
 }
Exemplo n.º 9
0
 // Use this for initialization
 void Start()
 {
     activateState = ActivateState.OFF;
 }
Exemplo n.º 10
0
 void ObjectActivate()
 {
     activateState = ActivateState.ON;
     Debug.Log("Whiteboard is active");
 }
Exemplo n.º 11
0
 // Use this for initialization
 void Start()
 {
     activateState = ActivateState.OFF;
     startPosition = transform.position;
     StartCoroutine(MoveOverTime());
 }
Exemplo n.º 12
0
 // Use this for initialization
 void Start()
 {
     renderer.enabled = false;
     activateState    = ActivateState.OFF;
 }
Exemplo n.º 13
0
 void ObjectDeactivate()
 {
     activateState = ActivateState.OFF;
     GetComponent <Animator>().SetBool("Rise", false);
 }
Exemplo n.º 14
0
 void ObjectActivate()
 {
     activateState = ActivateState.ON;
     GetComponent <Animator>().SetBool("Rise", true);
 }