Exemple #1
0
        /// <summary>
        /// 向指定方向以指定重力条件发射球类物体(触墙自动反弹)
        /// </summary>
        ///
        /// <param name="o"></param>
        /// <param name="vx"></param>
        /// <param name="vy"></param>
        /// <param name="g"></param>
        /// <returns></returns>
        public BallTo CallBallTo(Loon.Action.Event o, int r, int vx, int vy, double g)
        {
            if (isClose)
            {
                return(null);
            }
            BallTo ball = new BallTo(r, vx, vy, g);

            AddActionEvent(ball, o);
            return(ball);
        }
Exemple #2
0
        /// <summary>
        /// 让指定对象执行FadeTo事件
        /// </summary>
        ///
        /// <param name="o"></param>
        /// <param name="type"></param>
        /// <param name="speed"></param>
        /// <returns></returns>
        public FadeTo CallFadeTo(Loon.Action.Event o, int type, int speed)
        {
            if (isClose)
            {
                return(null);
            }
            FadeTo fade = new FadeTo(type, speed);

            AddActionEvent(fade, o);
            return(fade);
        }
Exemple #3
0
        /// <summary>
        /// 向指定坐标以指定速度让指定角色做为子弹发射
        /// </summary>
        ///
        /// <param name="o"></param>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <param name="speed"></param>
        /// <returns></returns>
        public FireTo CallFireTo(Loon.Action.Event o, int x, int y, double speed)
        {
            if (isClose)
            {
                return(null);
            }
            FireTo fire = new FireTo(x, y, speed);

            AddActionEvent(fire, o);
            return(fire);
        }
Exemple #4
0
        /// <summary>
        /// 让指定对象执行JumpTo跳跃事件
        /// </summary>
        ///
        /// <param name="o"></param>
        /// <param name="j"></param>
        /// <param name="g"></param>
        /// <returns></returns>
        public JumpTo CallJumpTo(Loon.Action.Event o, int j, float g)
        {
            if (isClose)
            {
                return(null);
            }
            JumpTo jump = new JumpTo(j, g);

            AddActionEvent(jump, o);
            return(jump);
        }
Exemple #5
0
        /// <summary>
        /// 让指定角色根据指定半径以指定速度循环转动
        /// </summary>
        ///
        /// <param name="o"></param>
        /// <param name="radius"></param>
        /// <param name="velocity"></param>
        /// <returns></returns>
        public CircleTo CallCircleTo(Loon.Action.Event o, int radius, int velocity)
        {
            if (isClose)
            {
                return(null);
            }
            CircleTo circle = new CircleTo(radius, velocity);

            AddActionEvent(circle, o);
            return(circle);
        }
Exemple #6
0
        /// <summary>
        /// 让指定角色做箭状发射(抛物线)
        /// </summary>
        /// <param name="o"></param>
        /// <param name="tx"></param>
        /// <param name="ty"></param>
        /// <returns></returns>
        public ArrowTo CallArrowTo(Loon.Action.Event o, float tx, float ty)
        {
            if (isClose)
            {
                return(null);
            }
            ArrowTo arrow = new ArrowTo(tx, ty);

            AddActionEvent(arrow, o);
            return(arrow);
        }
Exemple #7
0
        /// <summary>
        /// 让指定对象执行RotateTo旋转事件
        /// </summary>
        ///
        /// <param name="o"></param>
        /// <param name="angle"></param>
        /// <param name="speed"></param>
        /// <returns></returns>
        public RotateTo CallRotateTo(Loon.Action.Event o, float angle, float speed)
        {
            if (isClose)
            {
                return(null);
            }
            RotateTo rotate = new RotateTo(angle, speed);

            AddActionEvent(rotate, o);
            return(rotate);
        }
Exemple #8
0
        /// <summary>
        /// 让指定对象执行MoveTo事件
        /// </summary>
        ///
        /// <param name="field"></param>
        /// <param name="o"></param>
        /// <param name="flag"></param>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <returns></returns>
        public MoveTo CallMoveTo(Field2D field, Loon.Action.Event o, bool flag, int x, int y)
        {
            if (isClose)
            {
                return(null);
            }
            MoveTo move = new MoveTo(field, x, y, flag);

            AddActionEvent(move, o);
            return(move);
        }
Exemple #9
0
        /// <summary>
        /// 让角色缩放指定大小
        /// </summary>
        ///
        /// <param name="o"></param>
        /// <param name="sx"></param>
        /// <param name="sy"></param>
        /// <returns></returns>
        public ScaleTo CallScaleTo(Loon.Action.Event o, float sx, float sy)
        {
            if (isClose)
            {
                return(null);
            }
            ScaleTo scale = new ScaleTo(sx, sy);

            AddActionEvent(scale, o);
            return(scale);
        }
Exemple #10
0
        /// <summary>
        /// 让指定对象执行MoveTo事件
        /// </summary>
        ///
        /// <param name="o"></param>
        /// <param name="flag"></param>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <param name="w"></param>
        /// <param name="h"></param>
        /// <returns></returns>
        public MoveTo CallMoveTo(Loon.Action.Event o, bool flag, int x, int y, int w, int h)
        {
            if (isClose)
            {
                return(null);
            }
            if (tmpField == null)
            {
                tmpField = CreateArrayMap(w, h);
            }
            MoveTo move = new MoveTo(tmpField, x, y, flag);

            AddActionEvent(move, o);
            return(move);
        }
Exemple #11
0
 /// <summary>
 /// 让指定对象执行MoveTo事件
 /// </summary>
 ///
 /// <param name="o"></param>
 /// <param name="x"></param>
 /// <param name="y"></param>
 /// <returns></returns>
 public MoveTo CallMoveTo(Loon.Action.Event o, int x, int y)
 {
     return(CallMoveTo(o, x, y, 32, 32));
 }
Exemple #12
0
 /// <summary>
 /// 获得制定的独立事件
 /// </summary>
 ///
 /// <param name="tag"></param>
 /// <param name="actObject"></param>
 /// <returns></returns>
 public ActionEvent GetActionEvent(object tag, Loon.Action.Event actObject)
 {
     return(ActionControl.GetInstance().GetAction(tag, actObject));
 }
Exemple #13
0
 /// <summary>
 /// 添加一个独立事件
 /// </summary>
 ///
 /// <param name="action"></param>
 /// <param name="obj"></param>
 public void AddActionEvent(ActionEvent action, Loon.Action.Event obj)
 {
     ActionControl.GetInstance().AddAction(action, obj);
 }
Exemple #14
0
 /// <summary>
 /// 让指定对象执行MoveTo事件
 /// </summary>
 ///
 /// <param name="o"></param>
 /// <param name="x"></param>
 /// <param name="y"></param>
 /// <param name="w"></param>
 /// <param name="h"></param>
 /// <returns></returns>
 public MoveTo CallMoveTo(Loon.Action.Event o, int x, int y, int w, int h)
 {
     return(CallMoveTo(o, true, x, y, w, h));
 }
Exemple #15
0
 /// <summary>
 /// 让指定对象执行MoveTo事件
 /// </summary>
 ///
 /// <param name="field"></param>
 /// <param name="o"></param>
 /// <param name="x"></param>
 /// <param name="y"></param>
 /// <returns></returns>
 public MoveTo CallMoveTo(Field2D field, Loon.Action.Event o, int x, int y)
 {
     return(CallMoveTo(field, o, true, x, y));
 }
Exemple #16
0
 /// <summary>
 /// 启动指定对象对应的对立事件
 /// </summary>
 ///
 /// <param name="actObject"></param>
 public void StartActionEvent(Loon.Action.Event actObject)
 {
     ActionControl.GetInstance().Start(actObject);
 }
Exemple #17
0
 /// <summary>
 /// 设定指定角色暂停状态
 /// </summary>
 ///
 /// <param name="pause"></param>
 /// <param name="actObject"></param>
 public void PauseActionEvent(bool pause, Loon.Action.Event actObject)
 {
     ActionControl.GetInstance().Paused(pause, actObject);
 }
Exemple #18
0
 /// <summary>
 /// 让角色缩放指定大小
 /// </summary>
 ///
 /// <param name="o"></param>
 /// <param name="s"></param>
 /// <returns></returns>
 public ScaleTo CallScaleTo(Loon.Action.Event o, float s)
 {
     return(CallScaleTo(o, s, s));
 }
Exemple #19
0
 /// <summary>
 /// 让指定对象执行MoveTo事件
 /// </summary>
 ///
 /// <param name="o"></param>
 /// <param name="x"></param>
 /// <param name="y"></param>
 /// <param name="flag"></param>
 /// <returns></returns>
 public MoveTo CallMoveTo(Loon.Action.Event o, int x, int y, bool flag)
 {
     return(CallMoveTo(o, flag, x, y, 32, 32));
 }
Exemple #20
0
 /// <summary>
 /// 添加一个独立事件,并选择是否暂不启动
 /// </summary>
 ///
 /// <param name="action"></param>
 /// <param name="obj"></param>
 /// <param name="paused"></param>
 public void AddActionEvent(ActionEvent action, Loon.Action.Event obj, bool paused)
 {
     ActionControl.GetInstance().AddAction(action, obj, paused);
 }
Exemple #21
0
 /// <summary>
 /// 让指定对象执行FadeTo淡出事件
 /// </summary>
 ///
 /// <param name="o"></param>
 /// <param name="speed"></param>
 /// <returns></returns>
 public FadeTo CallFadeOutTo(Loon.Action.Event o, int speed)
 {
     return(CallFadeTo(o, FadeEffect.TYPE_FADE_OUT, speed));
 }
Exemple #22
0
 /// <summary>
 /// 删除所有和指定对象有关的独立事件
 /// </summary>
 ///
 /// <param name="actObject"></param>
 public void RemoveActionEvents(Loon.Action.Event actObject)
 {
     ActionControl.GetInstance().RemoveAllActions(actObject);
 }
Exemple #23
0
 /// <summary>
 /// 删除指定的独立事件
 /// </summary>
 ///
 /// <param name="tag"></param>
 /// <param name="actObject"></param>
 public void RemoveActionEvent(object tag, Loon.Action.Event actObject)
 {
     ActionControl.GetInstance().RemoveAction(tag, actObject);
 }