コード例 #1
0
ファイル: LaserModRep.cs プロジェクト: Virobeast2/RCLIENT
    protected override void EnableMod(ItemModRepresentation.Reason reason)
    {
        LaserBeam anyBeam = null;

        foreach (LaserBeam beam2 in this.beams)
        {
            if (beam2 != null)
            {
                anyBeam       = beam2;
                beam2.enabled = this.is_vm || allow_3rd_lasers;
            }
        }
        if (reason == ItemModRepresentation.Reason.Explicit)
        {
            this.PlaySound(anyBeam, base.modDataBlock.onSound);
        }
    }
コード例 #2
0
ファイル: LaserModRep.cs プロジェクト: Virobeast2/RCLIENT
    protected override void DisableMod(ItemModRepresentation.Reason reason)
    {
        LaserBeam anyBeam = null;

        foreach (LaserBeam beam2 in this.beams)
        {
            if (beam2 != null)
            {
                anyBeam       = beam2;
                beam2.enabled = false;
            }
        }
        if (reason == ItemModRepresentation.Reason.Explicit)
        {
            this.PlaySound(anyBeam, base.modDataBlock.offSound);
        }
    }
コード例 #3
0
ファイル: LampModRep.cs プロジェクト: salvadj1/RustSource
    protected override void EnableMod(ItemModRepresentation.Reason reason)
    {
        Light anyLight = null;

        foreach (Light light2 in this.lights)
        {
            if (light2 != null)
            {
                light2.enabled = true;
                anyLight       = light2;
            }
        }
        if (reason == ItemModRepresentation.Reason.Explicit)
        {
            this.PlaySound(anyLight, base.modDataBlock.onSound);
        }
    }
コード例 #4
0
ファイル: WeaponModRep.cs プロジェクト: sknchan/LegacyRust
 protected void SetOn(bool on, ItemModRepresentation.Reason reason)
 {
     if (this._on != on)
     {
         this._on = on;
         if (this._attached)
         {
             if (!on)
             {
                 this.DisableMod(reason);
             }
             else
             {
                 this.EnableMod(reason);
             }
         }
     }
 }
コード例 #5
0
    protected override void EnableMod(ItemModRepresentation.Reason reason)
    {
        LaserBeam laserBeam = null;

        LaserBeam[] laserBeamArray = this.beams;
        for (int i = 0; i < (int)laserBeamArray.Length; i++)
        {
            LaserBeam laserBeam1 = laserBeamArray[i];
            if (laserBeam1)
            {
                laserBeam          = laserBeam1;
                laserBeam1.enabled = (this.is_vm ? true : LaserModRep.allow_3rd_lasers);
            }
        }
        if (reason == ItemModRepresentation.Reason.Explicit)
        {
            this.PlaySound(laserBeam, base.modDataBlock.onSound);
        }
    }
コード例 #6
0
    protected override void DisableMod(ItemModRepresentation.Reason reason)
    {
        LaserBeam laserBeam = null;

        LaserBeam[] laserBeamArray = this.beams;
        for (int i = 0; i < (int)laserBeamArray.Length; i++)
        {
            LaserBeam laserBeam1 = laserBeamArray[i];
            if (laserBeam1)
            {
                laserBeam          = laserBeam1;
                laserBeam1.enabled = false;
            }
        }
        if (reason == ItemModRepresentation.Reason.Explicit)
        {
            this.PlaySound(laserBeam, base.modDataBlock.offSound);
        }
    }
コード例 #7
0
    protected override void EnableMod(ItemModRepresentation.Reason reason)
    {
        Light light = null;

        Light[] lightArray = this.lights;
        for (int i = 0; i < (int)lightArray.Length; i++)
        {
            Light light1 = lightArray[i];
            if (light1)
            {
                light1.enabled = true;
                light          = light1;
            }
        }
        if (reason == ItemModRepresentation.Reason.Explicit)
        {
            this.PlaySound(light, base.modDataBlock.onSound);
        }
    }
コード例 #8
0
 protected override void EnableMod(ItemModRepresentation.Reason reason)
 {
 }
コード例 #9
0
 protected virtual void BindStateFlags(CharacterStateFlags flags, ItemModRepresentation.Reason reason)
 {
 }
コード例 #10
0
 protected override void BindStateFlags(CharacterStateFlags flags, ItemModRepresentation.Reason reason)
 {
     base.BindStateFlags(flags, reason);
     base.SetOn(flags.laser, reason);
 }
コード例 #11
0
ファイル: WeaponModRep.cs プロジェクト: sknchan/LegacyRust
 protected abstract void EnableMod(ItemModRepresentation.Reason reason);