# SpatialFear.SFPickupTracker

00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 |
    //=============================================================================
    // Unreal Spatial Fear
    // Class: SFPickupTracker
    // Description:	Management class that keeps track of already collected picks
    //				by storing the pickup classes in a list
    //
    // Author: Markus Nuebel
    //=============================================================================

    class SFPickupTracker extends SFObject;

    var travel USXList	m_listPickupClasses;

    // Override, to some initialization stuff
    event PostBeginPlay()
    {
    	//class'SFUtils'.static.sfLogEx(5, "SFPickupTracker - PostBeginPlay: Entering");

    	// Call to base class
    	Super.PostBeginPlay();

    	// Create new instance of the tracking list
    	m_listPickupClasses	= new class'USXList';

    	if(None != m_listPickupClasses)
    		m_listPickupClasses.init();
    	else
    		class'SFUtils'.static.sfError( "SFPickupTracker - PostBeginPlay: Cannot instantiate m_listPickupClasses");
    }

    // Checks is the supplied class has already been seen
    function bool isUnknown(class oTestClass)
    {
    	local SFPickupElem oNew;

    	//class'SFUtils'.static.sfLogEx(5, "SFPickupTracker - isUnknown: Entering");

    	// Construct new object
    	oNew				= new class'SFPickupElem';
    	oNew.m_classPickup	= oTestClass;

    	if(m_listPickupClasses.isContained(oNew))
    	{
    		//class'SFUtils'.static.sfLogEx(5, "SFPickupTracker - isUnknown: class FOUND");
    		return false;
    	}
    	else
    	{
    		//class'SFUtils'.static.sfLogEx(5, "SFPickupTracker - isUnknown: class NOT found");
    		m_listPickupClasses.insert(oNew);
    		return true;
    	}
    }

    defaultproperties
    {
    }

class file time: 12/7/2003 3:58:24 PM - creation time: 12/7/2003 4:03:45 PM
Created with UnCodeX