Ejemplo n.º 1
0
 public static Characteristic CreateBase(int level, RankOfPersonage rank)
 {
     return(new Characteristic()
     {
         MaxHealth = 1000f * level * ( int )rank,
         MaxMana = 1000f * level * ( int )rank,
         MaxEnergy = 100f * ( int )rank,
         HealthRegeneration = 0.09f * level,
         ManaRegeneration = 0.09f * level,
         EnergyRegeneration = 0.1f,
         MoveSpeed = 100f,
         Speed = 1f
     });
 }
Ejemplo n.º 2
0
        /* --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- */

        public Personage(int level, RankOfPersonage rank, TypeOfPersonage type, int modelId, Vector3 position, int nameId = 3) : base(modelId, position, nameId)
        {
            isPlayer       = this is Player;
            this.type      = type;
            this.rank      = rank;
            this.level     = level;
            animationGroup = GroupOfAnimation.Create(this);
            Relationship   = RelationshipOfPersonage.Neutral;
            loot           = new Bag(isPlayer);
            if (isPlayer)
            {
                defaultTask = new PlayerMovementTask();
            }
            else
            {
                defaultTask = new WalkToSpawnPointTask();
            }
            currentTask = defaultTask;

            // !!! Ініціалізацію об'єктів здійснювати до методу LevelUp
            LevelUp(level);
        }
Ejemplo n.º 3
0
        /* --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- */

        public Humanoid(int level, RankOfPersonage rank, int modelId, Vector3 position, int nameId = 4) : base(level, rank, TypeOfPersonage.Humanoid, modelId, position, nameId)
        {
            gender = modelId % 2 == 0 ? GenderOfHumanoid.Male : GenderOfHumanoid.Female;
            rase   = ( RaseOfHumanoid )(modelId - ( byte )Gender);
        }