private void OnSpriteEnter(SceneSprite[] sprites) { foreach (var s in sprites) { Console.WriteLine("看到玩家 {0} 进入游戏", s.Name); } }
private void OnSpriteLeave(SceneSprite[] sprites) { foreach (var s in sprites) { Console.WriteLine("看到玩家 {0} 离开游戏", s.Name); } }
internal override void OnSpriteEnter(SceneSprite[] sprites) { List<SceneSprite> add = new List<SceneSprite>(); foreach (var item in sprites) { if (m_sprites.All(o => o.Id != item.Id)) { add.Add(item); m_sprites.Add(item); } } if (add.Count > 0 && SpriteEnter != null) SpriteEnter(add.ToArray()); }
private void OnSpriteMove(DateTime arg1, SceneSprite sprite) { Console.WriteLine("看到玩家 {0} 在 {1} 移动中", sprite.Name, sprite.Postion); }