Exemple #1
0
 public Model3D(SceneManager scene, Model model, Vector3 position, Vector3 scale)
 {
     Model = model;
     Scene = scene;
     Position = position;
     Scale = scale;
 }
Exemple #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;
 }
        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);
        }
Exemple #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);
 }
        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);
        }
 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);
 }
 public Character ConvertToCharacter(string playerName,string mapName, int playerNb, SceneManager scene)
 {
     return new Character(playerName, NameModel,mapName, playerNb, scene, Spawn, Scale, Speed);
 }