Code Monkey home page Code Monkey logo

birdflock's People

Contributors

black-square avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

birdflock's Issues

How can i create two new way points on my own terrain and scene ?

I can use your scenes the Main and it will work fine.
But i'm trying to use the whole package on my own scene and i want to make simple two way points so the birds will fly between them. So i added two Spheres to my scene and added to them the Trace script.
And added to the Main Camera the scripts camera control and main and drawer but i can't see the birds.

Even there are 100 birds i can't see them. Double click on any of the birds when the game is tunning not moving the camera to the clicked bird. But i can see the objects the birds moving i see in the Inspector i see the X Y Z change.

So i can't figure out what i did wrong.
Could you show me a sample how to make it work on a terrain with only two spheres as way points ?

Or maybe to take a look on my project ?

Thank you.

How can i change the BirdsCount variable value ?

In the Main.cs script there is a line:

public float BirdsCount = 10;

I tried to change it to 10 to 100 to 1000 to 1 but it didn't change the number of birds when running the game.

I want to be able to change the number of birds in two cases one when the game is running and then in the Inspector on the Main.cs script attched to the Main Camera if i type change the value to 1 there will be 1 bird if i change to 60 there will be 60 birds.

The second case is when the game not running when i'm in the editor and change the value in the Inspector and then running the game.

What i did so far and i guess i'm wrong is added a public variable to the top of the Main.cs:

public int _birdscount;

Then in the Update function i added this:

`bool isepressed = false;
void Update()
{
if (Input.GetKeyDown ("space"))
OnSettingsClick ();

    if (Input.GetKeyDown("e"))
    {
        isepressed = true;
        BoidSettingsEx eee;
        eee = settings.boidSettings[settings.instancePointNum];
        eee.BirdsCount = _birdscount;
        SaveSettings `();
    }

//We call it here to be sure that click on button desn't lead to camera target changing
if( !guiTools.MouseOverGUI && Input.GetMouseButtonDown(0) )
  cameraControl.CheckForNewTarget( Input.mousePosition );

guiTools.ManualUpdate();

}`

And in the SaveSettings i did:

void SaveSettings() { if (Application.isEditor) { using (var str = new FileStream (SettingsFilePath, FileMode.Create)) serializer.Serialize (str, settings); } if (isepressed == true) { using (var str = new FileStream (SettingsFilePath, FileMode.Create)) serializer.Serialize (str, settings); isepressed = false; } }

So when i click the e button it should change the value and update the Settings.xml file on the hard disk.

So it does changing the value in the Settings.xml file in the first part:

6

But in the other two places in the file where there is the line:

10 The value not change.

Thank you for the help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.