Exemple #1
0
        public override void MoveTo(Vector3 destiny, float facingAngle)
        {
            //Managers.MovementManager.MoveTo(this, this.Position, destiny, this.Speed);
            this.Path = this.World.FindPath(this.Position, destiny);

            if (this.Path == null)
            {
                return;
            }

            //Logging.LogManager.DefaultLogger.Trace("LinearTrajectoriesCount " + Path.LinearTrajectoriesCount.ToString());
            this.IsMoving = true;

            /*var movementMessage = new ACDTranslateNormalMessage
             * {
             *  ActorId = (int)this.DynamicID,
             *  Position = destiny,
             *
             *  Angle = facingAngle,
             *  lookAt = destiny,
             *  TurnImmediately = false,
             *  Speed = this.TranslateSpeed, //deberia ser translate speed
             *  Field5 = 0,
             * };
             *
             * this.World.BroadcastIfRevealed(movementMessage, this);*/
        }
Exemple #2
0
        public override void OnKill()
        {
            Executor.Execute(3000, () =>
            {
                /*Monster m = MonsterFactory.Create(51011).createDefaultBrain();
                 * this.World.Enter(m);*/

                Vector3 post = new Vector3(RandomHelper.Next(0, 10), 0, RandomHelper.Next(0, 10));
                Monster m    = MonsterFactory.Create(this.SNOId).createDefaultBrain();
                this.World.Enter(m, post);
            });

            base.OnKill();
        }
Exemple #3
0
        public void LookAt(Vector3 lookat_position)
        {
            //ojo esto de abajo nose si va.
            ACDTranslateNormalMessage movementMessage = new ACDTranslateNormalMessage
            {
                ActorId  = (int)this.DynamicID,
                Position = this.Position,
                Angle    = 0,
                //lookAt = lookat_position,
                TurnImmediately = false,
                Speed           = this.TranslateSpeed, //deberia ser translate speed
                Field5          = 0,
            };

            this.World.BroadcastIfRevealed(movementMessage, this);
        }