$treeview $search $mathjax
Stratagus  2.2.7
$projectbrief
$projectbrief
$searchbox
-->
         _________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

COrder_Resource Class Reference

#include <action_resource.h>

Inheritance diagram for COrder_Resource:

COrder

List of all members.


action_resource.cpp - The generic resource action.

 ~COrder_Resource ()
virtual bool IsValid () const
virtual void Save (CFile &file, const CUnit &unit) const
virtual bool ParseSpecificData (lua_State *l, int &j, const char *value, const CUnit &unit)
virtual void Execute (CUnit &unit)
virtual PixelPos Show (const CViewport &vp, const PixelPos &lastScreenPos) const
virtual void UpdatePathFinderData (PathFinderInput &input)
virtual bool OnAiHitUnit (CUnit &unit, CUnit *attacker, int)
Vec2i GetHarvestLocation () const
bool IsGatheringStarted () const
bool IsGatheringFinished () const
bool IsGatheringWaiting () const

Public Member Functions

 COrder_Resource (CUnit &harvester)
virtual COrder_ResourceClone () const
int GetCurrentResource () const

Friends

COrderCOrder::NewActionResource (CUnit &harvester, const Vec2i &pos)
COrderCOrder::NewActionResource (CUnit &harvester, CUnit &mine)
COrderCOrder::NewActionReturnGoods (CUnit &harvester, CUnit *depot)

Constructor & Destructor Documentation

COrder_Resource::COrder_Resource ( CUnit harvester  )  [inline]

COrder_Resource::~COrder_Resource (  ) 


Member Function Documentation

virtual COrder_Resource* COrder_Resource::Clone (  )  const [inline, virtual]

Implements COrder.

bool COrder_Resource::IsValid (  )  const [virtual]

Implements COrder.

void COrder_Resource::Save ( CFile file,
const CUnit unit 
) const [virtual]

Implements COrder.

bool COrder_Resource::ParseSpecificData ( lua_State *  l,
int &  j,
const char *  value,
const CUnit unit 
) [virtual]

Implements COrder.

void COrder_Resource::Execute ( CUnit unit  )  [virtual]

Control the unit action: getting a resource.

This the generic function for oil, gold, ...

Parameters:
unit Pointer to unit.

Implements COrder.

PixelPos COrder_Resource::Show ( const CViewport vp,
const PixelPos lastScreenPos 
) const [virtual]

Implements COrder.

void COrder_Resource::UpdatePathFinderData ( PathFinderInput input  )  [virtual]

Implements COrder.

bool COrder_Resource::OnAiHitUnit ( CUnit unit,
CUnit attacker,
int   
) [virtual]

Reimplemented from COrder.

int COrder_Resource::GetCurrentResource (  )  const [inline]

Vec2i COrder_Resource::GetHarvestLocation (  )  const

bool COrder_Resource::IsGatheringStarted (  )  const

bool COrder_Resource::IsGatheringFinished (  )  const

bool COrder_Resource::IsGatheringWaiting (  )  const


Friends And Related Function Documentation

COrder* COrder::NewActionResource ( CUnit harvester,
const Vec2i pos 
) [friend]

COrder* COrder::NewActionResource ( CUnit harvester,
CUnit mine 
) [friend]

COrder* COrder::NewActionReturnGoods ( CUnit harvester,
CUnit depot 
) [friend]


Member Data Documentation

position for terrain resource.


The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.