コード例 #1
0
    void MotherShipSetUp(MotherShip_Data x)
    {
        x.GetComponent <PathFollow>().enabled   = false;
        x.GetComponent <SeekBehaviour>().weight = 1f;
        x.GetComponent <Boid_Data>().target     = Vector3.zero;
        float dist = Vector3.Distance(x.transform.position, Vector3.zero);

        if (dist < x.distFromCenter)
        {
            x.GetComponent <PathFollow>().enabled   = true;
            x.GetComponent <SeekBehaviour>().weight = 0f;
            x.GetComponent <PathFollow>().weight    = 1f;
            x.GetComponent <Boid_Data>().action     = Boid_Data.Behaviour.run;
            SpawnCombatBoid(x);
        }
    }
コード例 #2
0
 void SpawnCombatBoid(MotherShip_Data x)
 {
     x.StartCoroutine(x.Spawn());
 }