コード例 #1
0
        protected override bool PerformEquipmentAction(EquipmentSlot slot)
        {
            if (!slot || !slot.characterBody)
            {
                return(false);
            }
            var cpt = slot.characterBody.GetComponent <RewindComponent>();

            if (!cpt || cpt.frames.Count == 0)
            {
                return(false);
            }
            var esm = EntityStateMachine.FindByCustomName(slot.characterBody.gameObject, "Body");

            if (esm == null || esm.state is RewindState)
            {
                return(false);
            }
            new MsgRewind(slot.characterBody).Send(R2API.Networking.NetworkDestination.Clients);
            if (Compat_ClassicItems.enabled)
            {
                if (Util.CheckRoll(Mathf.Pow(0.5f, Compat_ClassicItems.CheckEmbryoProc(slot, equipmentDef)) * 100f))
                {
                    return(false);
                }
            }
            return(true);
        }
コード例 #2
0
        // Token: 0x06001E1C RID: 7708 RVA: 0x00081C58 File Offset: 0x0007FE58
        private void Start()
        {
            Transform authorityTransform = this.projectileGhostController.authorityTransform;

            if (authorityTransform)
            {
                this.armingStateMachine = EntityStateMachine.FindByCustomName(authorityTransform.gameObject, "Arming");
            }
        }
コード例 #3
0
 // Token: 0x060030DF RID: 12511 RVA: 0x000D2498 File Offset: 0x000D0698
 public override void OnEnter()
 {
     base.OnEnter();
     this.projectileStickOnImpact = base.GetComponent <ProjectileStickOnImpact>();
     this.armingStateMachine      = EntityStateMachine.FindByCustomName(base.gameObject, "Arming");
     if (this.projectileStickOnImpact.enabled != this.shouldStick)
     {
         this.projectileStickOnImpact.enabled = this.shouldStick;
     }
     Util.PlaySound(this.enterSoundString, base.gameObject);
 }
コード例 #4
0
ファイル: ManipulatorMain.cs プロジェクト: Vale-X/Manipulator
        public override void OnEnter()
        {
            base.OnEnter();

            this.manipulatorController = this.characterBody.GetComponent <ManipulatorController>();
            this.jetpackMachine        = EntityStateMachine.FindByCustomName(base.gameObject, "Jet");
            this.animator     = base.GetModelAnimator();
            this.childLocator = base.GetModelChildLocator();
            if (this.childLocator)
            {
                this.tailBone = this.childLocator.FindChild("Tail").GetComponent <DynamicBone>();
            }
        }
コード例 #5
0
            void PlayDeathAnimation()
            {
                EntityStateMachine entityStateMachine = EntityStateMachine.FindByCustomName(base.gameObject, "Body");

                if (entityStateMachine == null)
                {
                    return;
                }
                //entityStateMachine.SetState(EntityState.Instantiate(EntityStates.BrotherMonster.TrueDeathState));
                //characterBody.SetBodyStateToPreferredInitialState
                //entityStateMachine.SetInterruptState(EntityState.Instantiate(new SerializableEntityStateType(typeof(EntityStates.BrotherMonster.TrueDeathState))), InterruptPriority.Death);
                entityStateMachine.SetInterruptState(new KneelState(), InterruptPriority.Death);
                //base.PlayAnimation("FullBody Override", "TrueDeath");
                characterBody.moveSpeed = 0f;
                characterBody.characterDirection.moveVector = characterBody.characterDirection.forward;
            }
コード例 #6
0
            public void OnReceived()
            {
                if (!_target)
                {
                    return;
                }
                var cpt = _target.GetComponent <RewindComponent>();

                if (!cpt || cpt.frames.Count == 0)
                {
                    return;
                }
                var esm = EntityStateMachine.FindByCustomName(_target.gameObject, "Body");

                if (esm == null || esm.state is RewindState)
                {
                    return;
                }
                esm.SetState(EntityStateCatalog.InstantiateState(Rewind.instance.rewindStateType));
            }
コード例 #7
0
 // Token: 0x06002D25 RID: 11557 RVA: 0x000BEA2C File Offset: 0x000BCC2C
 public override void FixedUpdate()
 {
     base.FixedUpdate();
     if (NetworkServer.active)
     {
         this.FixedUpdateServer();
     }
     if (this.startTime.timeSince > FadeOut.duration)
     {
         foreach (CharacterBody characterBody in CharacterBody.readOnlyInstancesList)
         {
             if (characterBody.hasEffectiveAuthority)
             {
                 EntityStateMachine entityStateMachine = EntityStateMachine.FindByCustomName(characterBody.gameObject, "Body");
                 if (entityStateMachine && !(entityStateMachine.state is Idle))
                 {
                     entityStateMachine.SetInterruptState(new Idle(), InterruptPriority.Frozen);
                 }
             }
         }
     }
 }
コード例 #8
0
 // Token: 0x06002D8E RID: 11662 RVA: 0x000C1310 File Offset: 0x000BF510
 public override void OnEnter()
 {
     base.OnEnter();
     this.jetpackStateMachine = EntityStateMachine.FindByCustomName(base.gameObject, "Jet");
 }