<cfcomponent
output="false"
hint="This component defines interactions with your Shortie. This is the base interaction that has zeroed out values. This interaction's INIT method should be overridden by specific interactions.">
<cfset VARIABLES.Instance = StructNew() />
<cfset VARIABLES.Instance.Name = "" />
<cfset VARIABLES.Instance.Key = "base_interaction" />
<cfset VARIABLES.Instance.TimeRequired = CreateTimeSpan(
0,
1,
0,
0
) />
<cfset VARIABLES.Instance.Love = 0 />
<cfset VARIABLES.Instance.Anger = 0 />
<cfset VARIABLES.Instance.Hunger = 0 />
<cfset VARIABLES.Instance.Happiness = 0 />
<cfset VARIABLES.Instance.Energy = 0 />
<cfset VARIABLES.Instance.IsPositive = true />
<cffunction
name="Init"
access="public"
returntype="any"
output="false"
hint="Returns an initialized Interaction component. This method is supposed to be overriden by interactions that extend this base interaction.">
<cfreturn THIS />
</cffunction>
<cffunction
name="GetAnger"
access="public"
returntype="numeric"
output="false"
hint="Gets the anger rating.">
<cfreturn VARIABLES.Instance.Anger />
</cffunction>
<cffunction
name="GetEnergy"
access="public"
returntype="numeric"
output="false"
hint="Gets the energy rating.">
<cfreturn VARIABLES.Instance.Energy />
</cffunction>
<cffunction
name="GetHappiness"
access="public"
returntype="numeric"
output="false"
hint="Gets the happiness rating.">
<cfreturn VARIABLES.Instance.Happiness />
</cffunction>
<cffunction
name="GetHunger"
access="public"
returntype="numeric"
output="false"
hint="Gets the hunger rating.">
<cfreturn VARIABLES.Instance.Hunger />
</cffunction>
<cffunction
name="GetIsPositive"
access="public"
returntype="boolean"
output="false"
hint="Gets the positive vs. negative falg.">
<cfreturn VARIABLES.Instance.IsPositive />
</cffunction>
<cffunction
name="GetKey"
access="public"
returntype="string"
output="false"
hint="Gets the interaction key.">
<cfreturn VARIABLES.Instance.Key />
</cffunction>
<cffunction
name="GetLove"
access="public"
returntype="numeric"
output="false"
hint="Gets the love rating.">
<cfreturn VARIABLES.Instance.Love />
</cffunction>
<cffunction
name="GetTimeRequired"
access="public"
returntype="numeric"
output="false"
hint="Gets the time required to perform action.">
<cfreturn VARIABLES.Instance.TimeRequired />
</cffunction>
</cfcomponent>