Class Flag
The flags themselves for Troopers to try and capture.
Inherited Members
Namespace: KaijuSolutions.Agents.Exercises.CTF
Syntax
public class Flag : Pickup
Fields
TeamOneFlag
Team one's flag.
Declaration
public static Flag TeamOneFlag
Field Value
| Type | Description |
|---|---|
| Flag |
TeamTwoFlag
Team two's flag.
Declaration
public static Flag TeamTwoFlag
Field Value
| Type | Description |
|---|---|
| Flag |
Properties
Flags
Both flags for easy access.
Declaration
public static IReadOnlyCollection<Flag> Flags { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IReadOnlyCollection<Flag> |
TeamOne
If this is team one's flag.
Declaration
public bool TeamOne { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
TeamOneAtBase
If team one's flag is at its base.
Declaration
public static bool TeamOneAtBase { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
TeamOneBase
The location of team one's base, being where their flag spawns and where to return captured flags to.
Declaration
public static Vector2 TeamOneBase { get; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
TeamOneBase3
The location of team one's base, being where their flag spawns and where to return captured flags to.
Declaration
public static Vector3 TeamOneBase3 { get; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
TeamOneBeingCarried
If team one's flag is being carried.
Declaration
public static bool TeamOneBeingCarried { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
TeamOneCarrier
The Trooper carrying team one's flag.
Declaration
public static Trooper TeamOneCarrier { get; }
Property Value
| Type | Description |
|---|---|
| Trooper |
TeamOneDistanceToBase
The distance of team one's flag to its base.
Declaration
public static float TeamOneDistanceToBase { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
TeamTwoAtBase
If team two's flag is at its base.
Declaration
public static bool TeamTwoAtBase { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
TeamTwoBase
The location of team two's base, being where their flag spawns and where to return captured flags to.
Declaration
public static Vector2 TeamTwoBase { get; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
TeamTwoBase3
The location of team two's base, being where their flag spawns and where to return captured flags to.
Declaration
public static Vector3 TeamTwoBase3 { get; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
TeamTwoBeingCarried
If team two's flag is being carried.
Declaration
public static bool TeamTwoBeingCarried { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
TeamTwoCarrier
The Trooper carrying team two's flag.
Declaration
public static Trooper TeamTwoCarrier { get; }
Property Value
| Type | Description |
|---|---|
| Trooper |
TeamTwoDistanceToBase
The distance of team two's flag to its base.
Declaration
public static float TeamTwoDistanceToBase { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
Methods
AtBase(Flag)
If a flag is at its base.
Declaration
public static bool AtBase(Flag flag)
Parameters
| Type | Name | Description |
|---|---|---|
| Flag | flag | The flag this is for. |
Returns
| Type | Description |
|---|---|
| System.Boolean | If the flag is at its base. |
AtBase(Boolean)
If a flag is at its base.
Declaration
public static bool AtBase(bool teamOne)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | teamOne | The team this is for. |
Returns
| Type | Description |
|---|---|
| System.Boolean | If the flag is at its base. |
Base(Flag)
Get the location of a flag's base.
Declaration
public static Vector2 Base(Flag flag)
Parameters
| Type | Name | Description |
|---|---|---|
| Flag | flag | The flag. |
Returns
| Type | Description |
|---|---|
| Vector2 | The location of a flag's base. |
Base(Boolean)
Get the location of a team's base, being where their flag spawns and where to return captured flags to.
Declaration
public static Vector2 Base(bool teamOne)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | teamOne | If this is team one's base being requested. |
Returns
| Type | Description |
|---|---|
| Vector2 | The location of the team's base. |
Base3(Flag)
Get the location of a flag's base.
Declaration
public static Vector3 Base3(Flag flag)
Parameters
| Type | Name | Description |
|---|---|---|
| Flag | flag | The flag. |
Returns
| Type | Description |
|---|---|
| Vector3 | The location of a flag's base. |
Base3(Boolean)
Get the location of a team's base, being where their flag spawns and where to return captured flags to.
Declaration
public static Vector3 Base3(bool teamOne)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | teamOne | If this is team one's base being requested. |
Returns
| Type | Description |
|---|---|
| Vector3 | The location of the team's base. |
BeingCarried(Flag)
If a flag is being carried.
Declaration
public static bool BeingCarried(Flag flag)
Parameters
| Type | Name | Description |
|---|---|---|
| Flag | flag | The flag this is for. |
Returns
| Type | Description |
|---|---|
| System.Boolean | If the flag is being carried. |
BeingCarried(Boolean)
If a flag is being carried.
Declaration
public static bool BeingCarried(bool teamOne)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | teamOne | The team this is for. |
Returns
| Type | Description |
|---|---|
| System.Boolean | If the flag is being carried. |
Carrier(Flag)
The Trooper which is carrying a flag.
Declaration
public static Trooper Carrier(Flag flag)
Parameters
| Type | Name | Description |
|---|---|---|
| Flag | flag | The flag to get the current carrier for. |
Returns
| Type | Description |
|---|---|
| Trooper | The Trooper which is carrying the flag, or NULL if there is no carrier. |
Carrier(Boolean)
The Trooper which is carrying a flag.
Declaration
public static Trooper Carrier(bool teamOne)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | teamOne | What team's flag to get the current carrier for. |
Returns
| Type | Description |
|---|---|
| Trooper | The Trooper which is carrying the flag, or NULL if there is no carrier. |
DistanceToBase(Flag)
The distance of a flag to its base.
Declaration
public static float DistanceToBase(Flag flag)
Parameters
| Type | Name | Description |
|---|---|---|
| Flag | flag | The flag. |
Returns
| Type | Description |
|---|---|
| System.Single | The distance of the flag to its base. |
DistanceToBase(Boolean)
The distance of a team's flag to its base.
Declaration
public static float DistanceToBase(bool teamOne)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | teamOne | The team this is for. |
Returns
| Type | Description |
|---|---|
| System.Single | The distance of the flag to its base. |
Drop()
Drop this flag.
Declaration
public void Drop()
Interact(Trooper)
What to do when interacted with.
Declaration
public override bool Interact(Trooper trooper)
Parameters
| Type | Name | Description |
|---|---|---|
| Trooper | trooper | The Trooper interracting with this. |
Returns
| Type | Description |
|---|---|
| System.Boolean | If the interaction was successful or not. |
Overrides
Return()
Return the flag to its base.
Declaration
public void Return()