Esempio n. 1
0
        private void PlayPlug(PlugEventType type)
        {
            switch (type)
            {
            case PlugEventType.PlugPower:
                SparkPool.instance.Emit(10, base.transform.position);
                CircuitSounds.PlugWireCurrent(base.transform.position);
                break;

            case PlugEventType.PlugNoPower:
                CircuitSounds.PlugWireNoCurrent(base.transform.position);
                break;

            case PlugEventType.UnplugPower:
                SparkPool.instance.Emit(10, base.transform.position);
                CircuitSounds.UplugWireCurrent(base.transform.position);
                break;

            case PlugEventType.UnplugNoPower:
                CircuitSounds.UnplugWireNoCurrent(base.transform.position);
                break;

            case PlugEventType.Short:
                SparkPool.instance.Emit(30, base.transform.position, 10f);
                CircuitSounds.PlugWireShortCircuit(base.transform.position);
                if (EasterShortCircuit.instance != null)
                {
                    EasterShortCircuit.instance.ShorCircuit();
                }
                break;
            }
        }
Esempio n. 2
0
 private void OnEnable()
 {
     instance = this;
 }