// Update is called once per frame
    void Update()
    {
        Swarming.LeaderMovement(myArena, 0.05f);
        Swarming.FollowerMovement(myArena, 0.05f);

        //FollowerMovement();
        //GizmoManager gm = GizmoManager.Instance;
        //gm.SetColor(Color.red);
        //gm.DrawSolidSphere(new Vector3(3.0f, 3.0f, 0.0f), 2, "2");
        //gm.EnableDrawGroup("2", true);
        //Debug.Log("Sphere should be drawn.");
        //bool shouldDraw = true;
        //GizmoManager.Instance.EnableDrawGroup("2", shouldDraw);
        //shouldDraw = !shouldDraw;
    }
示例#2
0
    void Start()
    {
        rb             = GetComponent <Rigidbody>();
        FireflyDragger = GameObject.FindGameObjectWithTag("FireflyDragger");
        scrSwarm       = GetComponent <Swarming>();
        trail          = GetComponent <TrailRenderer> ();
        swarmManager   = GameObject.FindGameObjectWithTag("MainSwarm").GetComponent <SwarmManagement>();

        //Set starting fireflies to start with no light
        areaLight      = GetComponentInChildren <Light>();
        startIntensity = areaLight.intensity;
        if (initialFirefly)
        {
            areaLight.intensity = 0;
        }
    }