You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ObjOfCharacter.cs 887 B

12345678910111213141516171819202122232425262728
  1. using Preparation.Interface;
  2. using Preparation.Utility;
  3. namespace GameClass.GameObj
  4. {
  5. /// <summary>
  6. /// 所有物,具有主人(Parent)(特定玩家)属性的对象
  7. /// </summary>
  8. public abstract class ObjOfCharacter : GameObj, IObjOfCharacter
  9. {
  10. private ICharacter? parent = null; // 主人
  11. public ICharacter? Parent
  12. {
  13. get => parent;
  14. set {
  15. lock (gameObjLock)
  16. {
  17. parent = value;
  18. }
  19. }
  20. }
  21. // LHR注:本来考虑在构造函数里设置parent属性,见THUAI4在游戏引擎中才设置该属性,作罢。——2021/9/24
  22. public ObjOfCharacter(XY initPos, int initRadius, PlaceType initPlace, GameObjType initType) :
  23. base(initPos, initRadius, initPlace, initType)
  24. {
  25. }
  26. }
  27. }