Ejemplo n.º 1
0
        public Gravity(string name, ActionBind o)
        {
			this.name = name;
			this.obj0 = o;
			this.bind = o;
			this.enabled = true;
		}
Ejemplo n.º 2
0
 public ActionElement(ActionBind k, bool v)
 {
     this.actions = new List <ActionEvent>(
         CollectionUtils.INITIAL_CAPACITY);
     this.key    = k;
     this.paused = v;
 }
Ejemplo n.º 3
0
 public Gravity(string name, ActionBind o)
 {
     this.name    = name;
     this.obj0    = o;
     this.bind    = o;
     this.enabled = true;
 }
Ejemplo n.º 4
0
                // 截取事件进行中数据
                public void Process(ActionBind o)
                {
                    // 获得角色移动方向
                    switch (move.GetDirection())
                    {
                    case Field2D.TUP:
                        // 根据当前移动方向,变更角色旋转方向(以下同)
                        o.SetRotation(270);
                        break;

                    case Field2D.TLEFT:
                        o.SetRotation(180);
                        break;

                    case Field2D.TRIGHT:
                        o.SetRotation(0);
                        break;

                    case Field2D.TDOWN:
                        o.SetRotation(90);
                        break;

                    default:
                        break;
                    }
                }
Ejemplo n.º 5
0
        public void Paused(bool pause, ActionBind actObject)
        {
            ActionElement element = (ActionElement)actions.Get(actObject);

            if (element != null)
            {
                element.paused = pause;
            }
        }
Ejemplo n.º 6
0
        public void Start(ActionBind actObject)
        {
            ActionElement element = (ActionElement)actions.Get(actObject);

            if (element != null)
            {
                element.paused = false;
            }
        }
Ejemplo n.º 7
0
		public void RemoveAllActions(ActionBind actObject) {
			if (actObject == null) {
				return;
			}
			ActionElement element = (ActionElement) actions.Get(actObject);
			if (element != null) {
				element.actions.Clear();
				DeleteElement(element);
			}
		}
Ejemplo n.º 8
0
 public void AddAction(ActionEvent action,
         ActionBind actObject, bool paused)
 {
     ActionElement element = (ActionElement)actions.Get(actObject);
     if (element == null)
     {
         element = new ActionElement(actObject, paused);
         actions.Put(actObject, element);
     }
     CollectionUtils.Add(element.actions, action);
     action.Start(actObject);
 }
Ejemplo n.º 9
0
		public virtual void Start(ActionBind o) {
			if (o == null) {
				return;
			}
			this.original = o;
			this.timer.Refresh();
			this.firstTick = true;
			this.isComplete = false;
			this.isInit = false;
			if (actionListener != null) {
				actionListener.Start(o);
			}
		}
Ejemplo n.º 10
0
        public void AddAction(ActionEvent action,
                              ActionBind actObject, bool paused)
        {
            ActionElement element = (ActionElement)actions.Get(actObject);

            if (element == null)
            {
                element = new ActionElement(actObject, paused);
                actions.Put(actObject, element);
            }
            CollectionUtils.Add(element.actions, action);
            action.Start(actObject);
        }
Ejemplo n.º 11
0
        public Gravity Add(ActionBind o, float vx, float vy, float ax, float ay,
                           float ave)
        {
            Gravity g = new Gravity(o);

            g.velocityX       = vx;
            g.velocityY       = vy;
            g.accelerationX   = ax;
            g.accelerationY   = ay;
            g.angularVelocity = ave;
            Add(g);
            return(g);
        }
Ejemplo n.º 12
0
		public void RemoveAction(object tag, ActionBind actObject) {
			ActionElement element = (ActionElement) actions.Get(actObject);
			if (element != null) {
				if (element.actions != null) {
					int limit = element.actions.Count;
					for (int i = 0; i < limit; i++) {
						ActionEvent a = element.actions[i];
						if (a.GetTag() == tag && a.GetOriginal() == actObject) {
							RemoveAction(i, element);
						}
					}
				}
			}
		}
Ejemplo n.º 13
0
        public void RemoveAllActions(ActionBind actObject)
        {
            if (actObject == null)
            {
                return;
            }
            ActionElement element = (ActionElement)actions.Get(actObject);

            if (element != null)
            {
                element.actions.Clear();
                DeleteElement(element);
            }
        }
Ejemplo n.º 14
0
 public virtual void Start(ActionBind o)
 {
     if (o == null)
     {
         return;
     }
     this.original = o;
     this.timer.Refresh();
     this.firstTick  = true;
     this.isComplete = false;
     this.isInit     = false;
     if (actionListener != null)
     {
         actionListener.Start(o);
     }
 }
Ejemplo n.º 15
0
        public void RemoveAction(object tag, ActionBind actObject)
        {
            ActionElement element = (ActionElement)actions.Get(actObject);

            if (element != null)
            {
                if (element.actions != null)
                {
                    int limit = element.actions.Count;
                    for (int i = 0; i < limit; i++)
                    {
                        ActionEvent a = element.actions[i];
                        if (a.GetTag() == tag && a.GetOriginal() == actObject)
                        {
                            RemoveAction(i, element);
                        }
                    }
                }
            }
        }
Ejemplo n.º 16
0
        public ActionEvent GetAction(object tag, ActionBind actObject)
        {
            ActionElement element = (ActionElement)actions.Get(actObject);

            if (element != null)
            {
                if (element.actions != null)
                {
                    int limit = element.actions.Count;
                    for (int i = 0; i < limit; i++)
                    {
                        ActionEvent a = element.actions[i];
                        if (a.GetTag() == tag)
                        {
                            return(a);
                        }
                    }
                }
            }
            return(null);
        }
Ejemplo n.º 17
0
			public ActionElement(ActionBind k, bool v) {
                this.actions = new List<ActionEvent>(
						CollectionUtils.INITIAL_CAPACITY);
				this.key = k;
				this.paused = v;
			}
Ejemplo n.º 18
0
		public ActionEvent GetAction(object tag, ActionBind actObject) {
			ActionElement element = (ActionElement) actions.Get(actObject);
			if (element != null) {
				if (element.actions != null) {
					int limit = element.actions.Count;
					for (int i = 0; i < limit; i++) {
						ActionEvent a = element.actions[i];
						if (a.GetTag() == tag)
							return a;
					}
				}
			}
			return null;
		}
Ejemplo n.º 19
0
		public void Start(ActionBind actObject) {
			ActionElement element = (ActionElement) actions.Get(actObject);
			if (element != null) {
				element.paused = false;
			}
		}
Ejemplo n.º 20
0
				public void Process(ActionBind o) {

				}
Ejemplo n.º 21
0
        public Gravity Add(ActionBind o, float vx, float vy, float ave)
        {
			return Add(o, vx, vy, 0, 0, ave);
		}
Ejemplo n.º 22
0
 public override void Start(ActionBind target)
 {
     base.Start(target);
     startLocation.Set(target.GetX(), target.GetY());
 }
Ejemplo n.º 23
0
				public void Stop(ActionBind o) {
					game.hero.SetFilterColor(LColor.white);
					game.hero.SetRotation(0);
				}
Ejemplo n.º 24
0
 public void RemoveAllActions(ActionBind actObject)
 {
     actions.RemoveAllActions(actObject);
 }
Ejemplo n.º 25
0
 public void RemoveAction(object tag, ActionBind actObject)
 {
     actions.RemoveAction(tag, actObject);
 }
Ejemplo n.º 26
0
 public void AddAction(ActionEvent action, ActionBind obj, bool paused)
 {
     actions.AddAction(action, obj, paused);
 }
Ejemplo n.º 27
0
 public void AddAction(ActionEvent action, ActionBind obj)
 {
     AddAction(action, obj, false);
 }
Ejemplo n.º 28
0
 public void Paused(bool pause_0, ActionBind actObject)
 {
     actions.Paused(pause_0, actObject);
 }
Ejemplo n.º 29
0
 public void Start(ActionBind actObject)
 {
     actions.Start(actObject);
 }
Ejemplo n.º 30
0
 public void Stop(ActionBind actObject)
 {
     actions.Stop(actObject);
 }
Ejemplo n.º 31
0
                public void Start(ActionBind o)
                {

                }
Ejemplo n.º 32
0
 public ActionEvent GetAction(object tag, ActionBind actObject)
 {
     return(actions.GetAction(tag, actObject));
 }
Ejemplo n.º 33
0
 public virtual void RemoveAllActions(ActionBind act)
 {
     ActionControl.GetInstance().RemoveAllActions(act);
 }
Ejemplo n.º 34
0
 public Gravity Add(ActionBind o, float vx, float vy)
 {
     return(Add(o, vx, vy, 0));
 }
Ejemplo n.º 35
0
 public void Stop(ActionBind o)
 {
     ((Actor)o).RotateTo(90);
 }
Ejemplo n.º 36
0
 public Gravity Add(ActionBind o, float vx, float vy, float ave)
 {
     return(Add(o, vx, vy, 0, 0, ave));
 }
Ejemplo n.º 37
0
				public void Start(ActionBind o) {
					game.hero.SetFilterColor(LColor.red);
					game.hero.Jump();
				}
Ejemplo n.º 38
0
                // 截取事件进行中数据
                public void Process(ActionBind o)
                {
                    // 获得角色移动方向
                    switch (move.GetDirection())
                    {
                        case Field2D.TUP:
                            // 根据当前移动方向,变更角色旋转方向(以下同)
                            o.SetRotation(270);
                            break;
                        case Field2D.TLEFT:
                            o.SetRotation(180);
                            break;
                        case Field2D.TRIGHT:
                            o.SetRotation(0);
                            break;
                        case Field2D.TDOWN:
                            o.SetRotation(90);
                            break;
                        default:
                            break;
                    }

                }
Ejemplo n.º 39
0
        public Gravity Add(ActionBind o, float vx, float vy)
        {
			return Add(o, vx, vy, 0);
		}
Ejemplo n.º 40
0
 public void Stop(ActionBind o)
 {
     enemy.RemoveActionEvents();
     enemy.GetLLayer().RemoveObject(enemy);
 }
Ejemplo n.º 41
0
		public Gravity Add(ActionBind o, float vx, float vy, float ax, float ay,
				float ave) {
			Gravity g = new Gravity(o);
			g.velocityX = vx;
			g.velocityY = vy;
			g.accelerationX = ax;
			g.accelerationY = ay;
			g.angularVelocity = ave;
			Add(g);
			return g;
		}
Ejemplo n.º 42
0
		public void Dispose() {
			this.enabled = false;
			this.bind = null;
		}
Ejemplo n.º 43
0
		public void Paused(bool pause, ActionBind actObject) {
			ActionElement element = (ActionElement) actions.Get(actObject);
			if (element != null) {
				element.paused = pause;
			}
		}
Ejemplo n.º 44
0
		public Gravity(ActionBind o) {
			this.obj0 = o;
			this.bind = o;
			this.enabled = true;
		}
Ejemplo n.º 45
0
 public void Start(ActionBind o)
 {
     game.hero.SetFilterColor(LColor.red);
     game.hero.Jump();
 }
Ejemplo n.º 46
0
 public virtual void AddAction(ActionEvent e, ActionBind act)
 {
     ActionControl.GetInstance().AddAction(e, act);
 }
Ejemplo n.º 47
0
 public void Stop(ActionBind o)
 {
     game.hero.SetFilterColor(LColor.white);
     game.hero.SetRotation(0);
 }
Ejemplo n.º 48
0
 // 当角色移动完毕时
 public void Stop(ActionBind o)
 {
     // 从Layer中删除此角色
     layer.RemoveObject((Actor)o);
 }
Ejemplo n.º 49
0
 public static RectBox FromActor(ActionBind bind)
 {
     return(new RectBox(bind.GetX(), bind.GetY(), bind.GetWidth(), bind.GetHeight()));
 }
Ejemplo n.º 50
0
 public void Start(ActionBind o)
 {
 }
Ejemplo n.º 51
0
		public ActionEvent GetAction(object tag, ActionBind actObject) {
			return actions.GetAction(tag, actObject);
		}
Ejemplo n.º 52
0
 // 当角色移动完毕时
 public void Stop(ActionBind o)
 {
     // 从Layer中删除此角色
     layer.RemoveObject((Actor)o);
 }
Ejemplo n.º 53
0
 public override void Start(ActionBind target)
 {
     base.Start(target);
     startLocation.Set(target.GetX(), target.GetY());
 }
Ejemplo n.º 54
0
		public void Paused(bool pause_0, ActionBind actObject) {
			actions.Paused(pause_0, actObject);
		}
Ejemplo n.º 55
0
 public virtual void RemoveAction(object tag, ActionBind act)
 {
     ActionControl.GetInstance().RemoveAction(tag, act);
 }
Ejemplo n.º 56
0
		public void Stop(ActionBind actObject) {
			actions.Stop(actObject);
		}
Ejemplo n.º 57
0
 public void Dispose()
 {
     this.enabled = false;
     this.bind    = null;
 }
Ejemplo n.º 58
0
 public void Process(ActionBind o)
 {
 }
Ejemplo n.º 59
0
 public Gravity(ActionBind o)
 {
     this.obj0    = o;
     this.bind    = o;
     this.enabled = true;
 }
Ejemplo n.º 60
0
		public void Start(ActionBind actObject) {
			actions.Start(actObject);
		}