Example #1
0
        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;
        }
Example #2
0
        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;
        }
Example #3
0
        /// <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();
        }
Example #4
0
        public SceneProp(int id, GameWorld world, string meshName, Vector3 initPosition) : base(id, world)
        {
            this.meshName = meshName;
            position      = initPosition;

            health = new HealthInfo(this, int.MaxValue, false);

            create();
        }
Example #5
0
 public GameObject(int id, GameWorld world)
 {
     this.id      = id;
     this.world   = world;
     camera       = world.Camera;
     sceneManager = world.SceneManager;
     physicsScene = world.PhysicsScene;
     physics      = world.PhysicsScene.Physics;
     moveInfo     = null;
     health       = new HealthInfo(this);
 }
Example #6
0
 public SceneProp(
     GameWorld world,
     ModScenePropDfnXml scenePropData,
     Vector3 initPosition
     ) : base(-1, world)
 {
     position           = initPosition;
     entities           = new List <Entity>();
     childModelData     = new List <ModModelDfnXml>();
     health             = new HealthInfo(this, int.MaxValue, false);
     this.scenePropData = scenePropData;
 }
Example #7
0
        public SceneProp(
            int id, GameWorld world,
            string name,
            string meshName,
            string materialName,
            Vector3 initPosition,
            Item attachedItem
            ) : base(id, world)
        {
            position = initPosition;

            health = new HealthInfo(this, int.MaxValue, false);

            create();
        }
Example #8
0
        public Item(
            int id,
            string itemName, string itemMeshName, ItemType itemType,
            ItemHaveAttachOption itemAttachOptionWhenHave,
            ItemUseAttachOption itemAttachOptionWhenUse,
            GameWorld world) : base(id, world)
        {
            this.itemName                 = itemName;
            this.itemMeshName             = itemMeshName;
            this.itemType                 = itemType;
            this.itemAttachOptionWhenUse  = itemAttachOptionWhenUse;
            this.itemAttachOptionWhenHave = itemAttachOptionWhenHave;

            health = new HealthInfo(this, int.MaxValue, false);

            create();
        }
Example #9
0
 public GameObject(string id)
 {
     moveInfo = null;
     health   = new HealthInfo(this);
 }