~ubuntu-branches/ubuntu/natty/plee-the-bear/natty

« back to all changes in this revision

Viewing changes to plee-the-bear/src/ptb/item/forest/gorilla.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Julien Jorge, Julien Jorge
  • Date: 2010-11-17 20:13:34 UTC
  • mfrom: (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20101117201334-o4dp7uq437to7oxb
Tags: 0.5.1-1
[ Julien Jorge ]
* New upstream release (Closes: #565062, #546514).
* Add armhf architecture (Closes: #604689).
* Remove patches integrated upstream: rpath-editors.diff, rpath-game.diff,
  editors-menu-section.diff.
* Bump the Standard-Version, no changes.
* Update my email address.
* Set build dependency of libclaw to 1.6.0.
* Add the missing ${misc:Depends} in debian/control.
* List gettext translations in bear-factory.install and plee-the-bear.install.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
  Plee the Bear
3
3
 
4
 
  Copyright (C) 2005-2009 Julien Jorge, Sebastien Angibaud
 
4
  Copyright (C) 2005-2010 Julien Jorge, Sebastien Angibaud
5
5
 
6
6
  This program is free software; you can redistribute it and/or modify it
7
7
  under the terms of the GNU General Public License as published by the
37
37
 
38
38
namespace ptb
39
39
{
40
 
  class plee;
 
40
  class player;
41
41
 
42
42
  /**
43
43
   * \brief The class describing a gorilla.
50
50
  class gorilla:
51
51
    public base_enemy< bear::engine::model<bear::engine::base_item> >
52
52
  {
53
 
    DECLARE_BASE_ITEM(gorilla, ptb);
 
53
    DECLARE_BASE_ITEM(gorilla);
54
54
 
55
55
  public:
56
56
    /** \brief The type of the parent class. */
75
75
    void inform_no_energy(const monster& attacker);
76
76
    void injure
77
77
    (const monster& attacker, const bear::universe::collision_info& info);
78
 
     void has_attacked();
 
78
     void has_attacked(const monster& other);
79
79
    bool get_defensive_power
80
80
    ( unsigned int index, const monster& attacker,
81
81
      const bear::universe::collision_info& info ) const;
91
91
    void progress_scan_left( bear::universe::time_type elapsed_time );
92
92
    void progress_scan_right( bear::universe::time_type elapsed_time );
93
93
    void progress_come_back( bear::universe::time_type elapsed_time );
94
 
    
 
94
 
95
95
    void start_idle();
96
96
    void start_attack();
97
97
    void start_angry();
102
102
    void start_come_back();
103
103
 
104
104
    bool listen();
105
 
    bool scan( bool left_orientation, 
 
105
    bool scan( bool left_orientation,
106
106
               bear::universe::coordinate_type distance ) const;
107
107
    bool scan_for_player
108
 
    ( const plee& p, bool left_orientation,
 
108
    ( const player& p, bool left_orientation,
109
109
      bear::universe::coordinate_type distance ) const;
110
110
    bool scan_no_wall_in_direction
111
111
    ( const bear::universe::position_type& origin,
136
136
    static const unsigned int s_listen_distance;
137
137
 
138
138
    /** \brief Current progress function. */
139
 
    progress_function_type m_progress;   
 
139
    progress_function_type m_progress;
140
140
 
141
141
    /** \brief The position of the origin. */
142
 
    bear::universe::position_type m_origin_position; 
 
142
    bear::universe::position_type m_origin_position;
143
143
 
144
144
    /** \brief Indicates if the gorilla want to come back. */
145
 
    bool m_want_come_back; 
 
145
    bool m_want_come_back;
146
146
 
147
147
    /** \brief Indicates if the gorilla want to scan. */
148
 
    bool m_want_scan; 
 
148
    bool m_want_scan;
149
149
 
150
150
    /** \brief The distance under which the gorilla scan.*/
151
151
    unsigned int m_scan_distance;