示例#1
0
    public override void onRightClick()
    {
        base.onRightClick();

        this.isOn = !this.isOn;
        this.dirty();

        this.world.statManager.leversFlipped.increase(1);

        CellBehaviorLever.alertNeighborsOfFlip(this);
    }
示例#2
0
    public void setTripped(EntityMinecart cart)
    {
        if (this.tripper == null || (this.tripper != cart))
        {
            this.tripper   = cart;
            this.isTripped = !this.isTripped;
            this.dirty();

            CellBehaviorLever.alertNeighborsOfFlip(this);
        }

        /*
         * this.tripTimer = 0.1f;
         * if(!this.isTripped) {
         *  this.isTripped = true;
         *  this.dirty();
         * }
         */
    }