Ejemplo n.º 1
0
 public override void OnDrawGizmos()
 {
     Gizmos.color = Color.yellow;
     Gizmos.DrawLine(boid.transform.position, boid.transform.position + (force));
     CreatureManager.Log("Theta" + theta);
     CreatureManager.Log("Force" + force);
 }
Ejemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     theta = (harmonic.theta - (Mathf.PI / 2)) % (Mathf.PI * 2.0f);
     CreatureManager.Log("Harmonic theta:" + theta);
     if (theta < Mathf.PI)
     {
         boid.position += (boid.up * Mathf.Abs(theta) * 10);
     }
 }
Ejemplo n.º 3
0
    // Update is called once per frame
    void Update()
    {
        if (harmonic != null)
        {
            float offset = rotationOffset * Mathf.Deg2Rad;


            angle = Mathf.Lerp(angle, Utilities.Map(Mathf.Sin((harmonic.theta + offset)), -1.0f, 1.0f, 1.0f, amplitude), Time.deltaTime);

            CreatureManager.Log("Scale: " + angle);
            transform.localScale = new Vector3(
                xAxis ? angle : 1
                , yAxis ? angle : 1
                , zAxis ? angle : 1
                );
        }
    }
Ejemplo n.º 4
0
 // Update is called once per frame
 void Update()
 {
     CreatureManager.Log("Alive species: " + alive.Count);
     CreatureManager.Log("Suspended species: " + suspended.Count);
 }