/// <summary> /// Constructor /// </summary> /// <param name="world">Environment</param> /// <param name="cam">Camera</param> /// <param name="id">Unique Id</param> /// <param name="teamId">Team Id</param> /// <param name="name">Name</param> /// <param name="meshName">Mesh Name</param> /// <param name="initPosition">Init Position</param> /// <param name="isBot">Is Bot or not</param> public Character( GameWorld world, int id, string teamId, string displayName, string meshName, Mogre.Vector3 initPosition, ModCharacterSkinDfnXML skin, bool isBot) : base(id, world) { this.world = world; this.displayName = displayName; this.meshName = meshName; this.skin = skin; this.isBot = isBot; Id = id; position = initPosition; brain = new DecisionSystem(this); weaponSystem = new WeaponSystem(this, new Fist(world, -1, id)); equipmentSystem = new EquipmentSystem(this); currentActivity = new Idle(); moveInfo = new MoveInfo(CharacterController.RUN_SPEED); health = new HealthInfo(this); messageQueue = new List <CharacterMessage>(); create(); }
public Character( GameWorld world, ModCharacterDfnXML chaData, ModCharacterSkinDfnXML chaSkin, Mogre.Vector3 initPosition, bool isBot) : base(-1, world) { this.world = world; this.isBot = isBot; this.chaData = chaData; skin = chaSkin; Id = id; brain = new DecisionSystem(this); weaponSystem = new WeaponSystem(this, null); equipmentSystem = new EquipmentSystem(this); currentActivity = new Idle(); moveInfo = new MoveInfo(CharacterController.RUN_SPEED); health = new HealthInfo(this); messageQueue = new List <CharacterMessage>(); initEquipments(); mesh = new CharacterController(world, chaData, chaSkin, initPosition, isBot); controller = (CharacterController)mesh; }
public Character( GameWorld world, ModCharacterDfnXML xmlData, ModCharacterSkinDfnXML skinXmlData, Mogre.Vector3 initPosition, bool isBot) : base(-1, world) { this.world = world; this.xmlData = xmlData; this.skinXmlData = skinXmlData; position = initPosition; Id = id; brain = new DecisionSystem(this); weaponSystem = new WeaponSystem(this, null); equipmentSystem = new EquipmentSystem(this); currentActivity = new Idle(); moveInfo = new MoveInfo(CharacterController.RUN_SPEED); health = new HealthInfo(this); messageQueue = new List <CharacterMessage>(); initEquipments(); renderable = new CharacterController(world, this, isBot); controller = (CharacterController)renderable; }