Esempio n. 1
0
        public void Update(EntityKey owner, IUserCmd cmd, Contexts contexts)
        {
            if (SharedConfig.IsServer)
            {
                if (!_unitSkill.IsEmtpy())
                {
                    _freeArgs.GetInput().SetUserCmd(cmd);

                    _freeArgs.TempUse("current", owner.WeaponController().RelatedFreeData);

                    _unitSkill.Frame(_freeArgs);

                    _freeArgs.Resume("current");
                }
            }
        }
Esempio n. 2
0
        public void OnUpdate(EntityKey entityKey, WeaponSideCmd cmd, Contexts contexts)
        {
            var weaponController = entityKey.WeaponController();

            if (CheckInterrupt(weaponController, cmd))
            {
                return;
            }
            UpdateFire(weaponController, cmd, contexts);
            if (CleanFireInspector(cmd))
            {
                weaponController.RelatedThrowAction.ClearState();
                weaponController.RelatedThrowAction.ThrowingEntityKey = EntityKey.Default;
                weaponController.RelatedThrowAction.LastFireWeaponKey = 0;
            }
        }
        public void OnUpdate(EntityKey entityKey, WeaponSideCmd cmd, Contexts contexts)
        {
            var weaponController = entityKey.WeaponController();

            SyncData(weaponController);
            if (CheckInterrupt(weaponController, cmd))
            {
                return;
            }

            UpdateFire(weaponController, cmd, contexts);
            if (CleanFireInspector(cmd))
            {
                throwingActionData.InternalCleanUp();
                throwingActionData.ThrowingEntityKey = EntityKey.Default;
                throwingActionData.LastFireWeaponKey = 0;
            }
        }