コード例 #1
0
 private void getOwnershipAndBody(EntityStates.LaserTurbine.LaserTurbineBaseState self)
 {
     //see if all these gets were being chached for a reason
     _turbineGenericOwnership = self.outer.GetComponent <GenericOwnership>();
     //ownerbody in their property is being cached so they don't run getcomponent all the time.
     _turbineOwnerBody = (_turbineGenericOwnership != null) ? _turbineGenericOwnership.ownerObject.GetComponent <CharacterBody>() : null;
 }
コード例 #2
0
        private float LaserTurbineBaseState_GetDamage(On.EntityStates.LaserTurbine.LaserTurbineBaseState.orig_GetDamage orig, EntityStates.LaserTurbine.LaserTurbineBaseState self)
        {
            float num = 1f;

            if (_turbineGenericOwnership)
            {
                if (_turbineOwnerBody.inventory)
                {
                    num = _turbineOwnerBody.damage;
                }
            }
            Utils.Log($"LaserTurbineBaseState_GetDamage: {num}");
            return(num);
        }
コード例 #3
0
 private void LaserTurbineBaseState_OnEnter(On.EntityStates.LaserTurbine.LaserTurbineBaseState.orig_OnEnter orig, EntityStates.LaserTurbine.LaserTurbineBaseState self)
 {
     orig(self);
     getOwnershipAndBody(self);
 }
コード例 #4
0
ファイル: CameraFixes.cs プロジェクト: DrBibop/RoR2VRMod
 private static void HideDisc(On.EntityStates.LaserTurbine.LaserTurbineBaseState.orig_OnEnter orig, EntityStates.LaserTurbine.LaserTurbineBaseState self)
 {
     orig(self);
     if (self.ownerBody.IsLocalBody())
     {
         self.laserTurbineController.showTurbineDisplay = false;
     }
 }