Ejemplo n.º 1
0
 public void read(MemoryStream msdata)
 {
     seq     = proto_util.readUByte(msdata);
     skillId = proto_util.readUInt(msdata);
     dir     = proto_util.readUByte(msdata);
     PTarget.readLoop(msdata, target);
 }
Ejemplo n.º 2
0
 /**
  * 技能确认
  */
 public static void write_13_1(MemoryStream msdata, byte seq, uint skillId, byte dir, List <PTarget> target)
 {
     proto_util.writeUByte(msdata, seq);
     proto_util.writeUInt(msdata, skillId);
     proto_util.writeUByte(msdata, dir);
     PTarget.writeLoop(msdata, target);
 }
Ejemplo n.º 3
0
        void PathDiff(IPopupItem oldValue, IPopupItem newValue, PTarget target)
        {
            GetPath(oldPath, oldValue);
            GetPath(newPath, newValue);

            oldPath.Where(x => !newPath.Contains(x)).ForEach(p =>
            {
                switch (target)
                {
                case PTarget.Highlight:
                    p.IsHighlighted = false;
                    break;

                case PTarget.Open:
                    p.IsOpen = false;
                    break;
                }
            });
            newPath.ForEach(p =>
            {
                switch (target)
                {
                case PTarget.Highlight:
                    p.IsHighlighted = true;
                    break;

                case PTarget.Open:
                    p.IsOpen = true;
                    break;
                }
            });
        }
 // Use this for initialization
 void Start()
 {
     agent          = GetComponent <NavMeshAgent> ();
     zombieAnimator = GetComponent <Animator> ();
     target         = GameObject.Find("Player").transform;
     if (target != null)
     {
         pt = target.GetComponent <PTarget> ();
     }
 }
		void PathDiff(IPopupItem oldValue, IPopupItem newValue, PTarget target)
		{
			GetPath(oldPath, oldValue);
			GetPath(newPath, newValue);

			oldPath.Where(x => !newPath.Contains(x)).ForEach(p =>
			{
				switch (target)
				{
					case PTarget.Highlight:
						p.IsHighlighted = false;
						break;
					case PTarget.Open:
						p.IsOpen = false;
						break;
				}
			});
			newPath.ForEach(p =>
			{
				switch (target)
				{
					case PTarget.Highlight:
						p.IsHighlighted = true;
						break;
					case PTarget.Open:
						p.IsOpen = true;
						break;
				}
			});
		}