Beispiel #1
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);
        }
Beispiel #2
0
 public void AssignToPath(Path path)
 {
     currentTask = new FollowPathTask(path);
 }
Beispiel #3
0
 public void WalkToPoint(Path.Node node)
 {
     currentTask = new WalkToPointTask(node);
 }
Beispiel #4
0
 public void WalkToPoint(float x, float y, float z, float radius = 1f)
 {
     currentTask = new WalkToPointTask(x, y, z, radius);
 }
Beispiel #5
0
 public void WalkToPoint(Vector3 position, float radius = 1f)
 {
     currentTask = new WalkToPointTask(position, radius);
 }
Beispiel #6
0
 public void ClearTask()
 {
     currentTask = defaultTask;
 }