示例#1
0
        static void Main(string[] args)
        {
            var abydos = new GateAddress(27, 7, 15, 32, 12, 30);
            var gate   = new Gate();

            foreach (var glyph in abydos.Address.Values)
            {
                gate.EnterGlyph(glyph);
                Thread.Sleep(1000);
            }
            gate.EnterGlyph(Glyph.Origin);
            Thread.Sleep(1000);
            if (gate.Status == GateStatus.Dialed)
            {
                gate.Activate();
            }

            Console.Read();
        }
示例#2
0
    void GetPressed()
    {
        if (b1BoxCollider.IsTouchingLayers(LayerMask.GetMask("Player")) && b2BoxCollider.IsTouchingLayers(LayerMask.GetMask("Player")))
        {
            if (!b1BoxCollider.isTrigger && !b2BoxCollider.isTrigger)
            {
                if (forGate)
                {
                    gateScript.Activate();
                }
                if (forBridge)
                {
                    bridgeScript.Activate();
                }
                if (forElevator)
                {
                    elevatorScript.Activate();
                }
                if (for2Elevators)
                {
                    elevatorScript.Activate();
                    elevator2Script.Activate();
                }
                if (forFire)
                {
                    IEnumerator WaitToKillFire()
                    {
                        yield return(new WaitForSeconds(1f));

                        Destroy(fire);
                    }

                    StartCoroutine(WaitToKillFire());
                }
            }
            b1BoxCollider.isTrigger     = true;
            b1CapsuleCollider.isTrigger = true;
            b2BoxCollider.isTrigger     = true;
            b2CapsuleCollider.isTrigger = true;
        }
    }
    void GetPressed()
    {
        if (myCapsuleCollider.IsTouchingLayers(LayerMask.GetMask("Player")))
        {
            if (active)
            {
                if (forGate)
                {
                    gateScript.Activate();
                }
                if (forBridge)
                {
                    bridgeScript.Activate();
                }
                if (forElevator)
                {
                    elevatorScript.Activate();
                }
                if (forWaterfall)
                {
                    waterfallScript.StopWaterfall();
                }
                if (forFire)
                {
                    IEnumerator WaitToKillFire()
                    {
                        yield return(new WaitForSeconds(1f));

                        Destroy(fire);
                    }

                    StartCoroutine(WaitToKillFire());
                }
            }
            active = false;
        }
    }