当前位置: 首页>>代码示例>>C#>>正文


C# Actor.PlayEffectGroup方法代码示例

本文整理汇总了C#中Mooege.Core.GS.Actors.Actor.PlayEffectGroup方法的典型用法代码示例。如果您正苦于以下问题:C# Actor.PlayEffectGroup方法的具体用法?C# Actor.PlayEffectGroup怎么用?C# Actor.PlayEffectGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mooege.Core.GS.Actors.Actor的用法示例。


在下文中一共展示了Actor.PlayEffectGroup方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RunPower


//.........这里部分代码省略.........
            else
            {
                target = user.World.GetActorByDynamicId(targetId);
                if (target == null)
                    return false;

                targetPosition = target.Position;
            }

            #region Items and Monster spawn HACK
            /*
            // HACK: intercept hotbar skill 1 to always spawn test mobs.
            if (user is Player && powerSNO == (user as Player).SkillSet.HotBarSkills[4].SNOSkill)
            {
                // number of monsters to spawn
                int spawn_count = 3;

                // list of actorSNO values to pick from when spawning
                //int[] actorSNO_values = { 5387, 6652, 5346 };
                //int[] actorSNO_values = { 187664, 128781, 4982 }; - Quilldemons.
                int actorSNO = 4982;//actorSNO_values[RandomHelper.Next(actorSNO_values.Length)];
                Logger.Debug("3 monsters spawning with actor sno {0}", actorSNO);

                for (int n = 0; n < spawn_count; ++n)
                {
                    Vector3D position;

                    if (targetPosition.X == 0f)
                    {
                        position = new Vector3D(user.Position);
                        if ((n % 2) == 0)
                        {
                            position.X += (float)(RandomHelper.NextDouble() * 20);
                            position.Y += (float)(RandomHelper.NextDouble() * 20);
                        }
                        else
                        {
                            position.X -= (float)(RandomHelper.NextDouble() * 20);
                            position.Y -= (float)(RandomHelper.NextDouble() * 20);
                        }
                    }
                    else
                    {
                        position = new Vector3D(targetPosition);
                        position.X += (float)(RandomHelper.NextDouble() - 0.5) * 20;
                        position.Y += (float)(RandomHelper.NextDouble() - 0.5) * 20;
                        position.Z = user.Position.Z;
                    }
                    
                    //Monster mon = new Monster(user.World, actorSNO, null);
                    //mon.SetBrain(new Mooege.Core.GS.AI.Brains.MonsterBrain(mon));
                    //mon.Position = position;
                    //mon.Scale = 1.35f;
                    //mon.Attributes[GameAttribute.Hitpoints_Max_Total] = 5f;
                    //mon.Attributes[GameAttribute.Hitpoints_Max] = 5f;
                    //mon.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 0f;
                    //mon.Attributes[GameAttribute.Hitpoints_Cur] = 5f;
                    //mon.Attributes[GameAttribute.Attacks_Per_Second_Total] = 1.0f;
                    //mon.Attributes[GameAttribute.Damage_Weapon_Min_Total, 0] = 5f;
                    //mon.Attributes[GameAttribute.Damage_Weapon_Delta_Total, 0] = 7f;
                    //mon.Attributes[GameAttribute.Casting_Speed_Total] = 1.0f;
                    //user.World.Enter(mon);

                    Monster mon = new QuillDemon(user.World, actorSNO, null);
                    mon.Position = position;
                    mon.Scale = 1f;
                    user.World.Enter(mon);
                }

                // spawn some useful items for testing at the ground of the player
                if (!_spawnedHelperItems)
                {
                    _spawnedHelperItems = true;
                    Items.ItemGenerator.Cook((Players.Player)user, "Sword_2H_205").EnterWorld(user.Position);
                    Items.ItemGenerator.Cook((Players.Player)user, "Crossbow_102").EnterWorld(user.Position);
                    for (int n = 0; n < 30; ++n)
                        Items.ItemGenerator.Cook((Players.Player)user, "Runestone_Unattuned_07").EnterWorld(user.Position);
                }

                return true;
            }*/
            #endregion
            
            // find and run a power implementation
            var implementation = PowerLoader.CreateImplementationForPowerSNO(powerSNO);
            if (implementation != null)
            {
                return RunPower(user, implementation, target, targetPosition, targetMessage);
            }
            else
            {
                // no power script is available, but try to play the cast effects
                var efgTag = Mooege.Core.GS.Common.Types.TagMap.PowerKeys.CastingEffectGroup_Male;
                var tagmap = PowerTagHelper.FindTagMapWithKey(powerSNO, efgTag);
                if (tagmap != null)
                    user.PlayEffectGroup(tagmap[efgTag].Id);

                return false;
            }
        }
开发者ID:jujuman,项目名称:mooege,代码行数:101,代码来源:PowerManager.cs

示例2: OnChannelOpen

        public override void OnChannelOpen()
        {
            EffectsPerSecond = 0.2f;

            _targetProxy = SpawnEffect(RuneSelect(134595, 170443, 170285, 170830, 170590, 134595), TargetPosition, 0, WaitInfinite());
            _userProxy = SpawnProxy(User.Position, WaitInfinite());
            _userProxy.PlayEffectGroup(RuneSelect(134442, 170263, 170264, 170569, 170572, 164077), _targetProxy);
        }
开发者ID:n4v,项目名称:mooege,代码行数:8,代码来源:Wizard.cs

示例3: OnChannelOpen

        public override void OnChannelOpen()
        {
            RunDelay = 0.2f;

            _targetProxy = SpawnProxy(TargetPosition, WaitInfinite());
            _userProxy = SpawnProxy(User.Position, WaitInfinite());
            // TODO: fixed casting effect so it rotates along with actor
            _userProxy.PlayEffectGroup(97385);
            _userProxy.PlayEffectGroup(134442, _targetProxy);
        }
开发者ID:n3rus,项目名称:mooege,代码行数:10,代码来源:Wizard.cs


注:本文中的Mooege.Core.GS.Actors.Actor.PlayEffectGroup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。