示例#1
0
 public Model3D(SceneManager scene, Model model, Vector3 position, Vector3 scale)
 {
     Model = model;
     Scene = scene;
     Position = position;
     Scale = scale;
 }
示例#2
0
 public Zeus(SceneManager scene, Vector3 position, Vector3 scale)
     : base("Zeus", scene, position, scale)
 {
     Pitch = -MathHelper.PiOver2;
     Yaw = MathHelper.PiOver2;
     _baseYaw = Yaw;
     Gravity = 0.005f * Speed;
 }
示例#3
0
        public ComputerCharacter(string playerName, string nameCharacter, string mapName, SceneManager scene, Vector3 position, Vector3 scale
            , float speed, byte handicap, byte level)
            : base(playerName, nameCharacter, mapName, -1, scene, position, scale, speed)
        {
            EnnemiesLevel = new Dictionary<Character, float>();
            Handicap = handicap;
            Level = (byte)(10-level);
            GetKey = GetMovement;
            Action = DoNothing;
            _oldDamages = Damages;
            FillPriorityAction();

            Movements = new Dictionary<Movement, bool>();
            foreach (Movement move in Enum.GetValues(typeof(Movement)))
                Movements.Add(move, false);
        }
示例#4
0
 public Character(string playerName, string nameCharacter, string mapName, int playerNb, SceneManager scene, Vector3 position, Vector3 scale
     , float speed = 1f)
     : base(nameCharacter, scene, position, scale, speed)
 {
     Playing = true;
     ID = 0;
     PlayerNb = playerNb;
     PlayerName = playerName;
     MapName = mapName;
     Face = RessourceProvider.CharacterFaces[nameCharacter];
     Pitch = -MathHelper.PiOver2;
     Yaw = MathHelper.PiOver2;
     BaseYaw = Yaw;
     Gravity = -20f;
     _gravity = new Vector3(0, Gravity, 0);
     SpawnPosition = position;
     _latteralMove = new Vector3(LatteralSpeed, 0, 0);
     GetKey = (movement) => GetUniversalKey(movement).IsPressed();
     CreateParticlesCharacter(ModelName);
 }
示例#5
0
        public AnimatedModel3D(string nameCharacter, SceneManager scene, Vector3 position, Vector3 scale, float speed = 1)
        {
            ModelName = nameCharacter;
            Model = Global.RessourceProvider.AnimatedModels[ModelName];
            Scene = scene;
            Position = position;
            Scale = scale;
            _animClip = 0;

            AnimationController = new AnimationController(Model.SkeletonBones)
            {
                Speed = speed,
                TranslationInterpolation = InterpolationMode.Linear,
                OrientationInterpolation = InterpolationMode.Linear,
                ScaleInterpolation = InterpolationMode.Linear
            };

            _speed = speed;

            SetAnimation(Animation.Default);
        }
示例#6
0
 public ComputerCharacter ConvertToComputerCharacter(string playerName, string mapName, SceneManager scene, byte handicap, byte level)
 {
     return new ComputerCharacter(playerName, NameModel,mapName, scene, Spawn, Scale, Speed, handicap, level);
 }
示例#7
0
 public Character ConvertToCharacter(string playerName,string mapName, int playerNb, SceneManager scene)
 {
     return new Character(playerName, NameModel,mapName, playerNb, scene, Spawn, Scale, Speed);
 }