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