示例#1
0
 // Use this for initialization
 void Start()
 {
     controller = GameObject.Find("controller").GetComponent <Create_Teams>();
     teamID     = transform.GetComponent <AILogic> ().teamID; // this soldiers team id
     myID       = transform.GetComponent <AILogic> ().myID;   // this soldiers id
     AssignRange();                                           // Randomly assign a range for this soldier
     hp     = 15;                                             // set the HP for this soldier
     damage = 2;                                              // the damage that this soldier does per frame
     target = null;                                           // the target that this soldier will damage
 }
示例#2
0
 // Use this for initialization
 void Start()
 {
     velocity   = Vector3.zero;
     controller = GameObject.Find("controller").GetComponent <Create_Teams> ();
     // path controller
     pathController = GetComponent <Pathing> ();
     // sanity check if pathing does not exist.
     if (pathController == null)
     {
         pathWeight = 0;
     }
     rb = GetComponent <Rigidbody> ();
 }
示例#3
0
    private float healthConfidence;//, VIPSafety;


    // Use this for initialization
    void Start()
    {
        logic       = transform.GetComponent <AILogic>();
        interaction = transform.GetComponent <Interaction>();
        controller  = GameObject.Find("controller").GetComponent <Create_Teams>();
    }
示例#4
0
 // Use this for initialization
 void Start()
 {
     hp    = 30;                                                           // Hp of VIPs
     logic = transform.GetComponent <AILogic>();
     CT    = GameObject.Find("controller").GetComponent <Create_Teams> (); // the accessor for the list we need to remove VIPs from when they are destroyed
 }