Beispiel #1
0
    Vector2 GetRandomGoalVector()
    {
        float randAng = Random.Range(0, 360) * Mathf.Deg2Rad;

        return(GV.AddVectors(new Vector2((float)Mathf.Cos(randAng), (float)Mathf.Sin(randAng)) * (GV.ANT_STATE_TIMER + 1) * GV.ANT_SPEED, transform.position));
        //return GV.AddVectors(new Vector2(Random.Range(-1f, 1f), Random.Range(-1f, 1f)).normalized * (GV.ANT_STATE_TIMER + 1) * GV.ANT_SPEED, transform.position);
    }