qmlfrontend/team.h
author Wuzzy <Wuzzy2@mail.ru>
Thu, 03 Jan 2019 19:46:48 +0100
changeset 14535 5ac181cb2396
parent 14312 f1a5b7baa87f
permissions -rw-r--r--
Fix bee targeting fail across wrap world edge Previously, the bee always aimed for the light area, no matter where you actually put the target. It also got confused whenever it flew across the wrap world edge. How the bee works now: 1) The placed bee target is *not* recalculated when it was placed in the "gray" part of the wrap world edge. This allows for more fine-tuning. 1a) Place target in light area: bee aims for target light area 1b) Place target in gray area: bee aims for target, but flies to gray area first 2) Bee target is recalculated whenever bee passes the wrap world edge.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14164
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     1
#ifndef TEAM_H
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     2
#define TEAM_H
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     3
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     4
#include <QObject>
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     5
#include <QVector>
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     6
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     7
struct Hedgehog {
14312
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
     8
  Hedgehog();
14164
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     9
14312
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    10
  QByteArray name;
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    11
  QByteArray hat;
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    12
  quint32 hp;
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    13
  int level;
14164
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    14
};
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    15
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    16
class Team {
14312
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    17
 public:
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    18
  explicit Team();
14164
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    19
14312
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    20
  void resize(int number);
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    21
  QVector<Hedgehog> hedgehogs() const;
14164
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    22
14312
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    23
  QByteArray name;
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    24
  QByteArray color;
14164
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    25
14312
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    26
 private:
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    27
  QVector<Hedgehog> m_hedgehogs;
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    28
  int m_hedgehogsNumber;
14164
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    29
};
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    30
14312
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    31
#endif  // TEAM_H