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 868 B

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