Exemple #1
0
    void Start()
    {
        this.blowItUp = new DestroyAsteroidDelegate(AsteroidWasDestroyed);

        GameObject world = GameObject.Find("GameControllerTag");

        if (world != null)
        {
            this.gcs = world.GetComponent <GameControllerScript>();
        }

        if (this.numAsteroidsToSpawn == 0)
        {
            this.numAsteroidsToSpawn = 2;
        }

        if (this.maxVelocity == 0)
        {
            this.maxVelocity = 2.0f;
        }
    }
    void Start()
    {
        this.blowItUp = new DestroyAsteroidDelegate(AsteroidWasDestroyed);

        GameObject world = GameObject.Find("GameControllerTag");
        if (world != null)
        {
            this.gcs = world.GetComponent<GameControllerScript>();
        }

        if (this.numAsteroidsToSpawn == 0)
        {
            this.numAsteroidsToSpawn = 2;
        }

        if (this.maxVelocity == 0)
        {
            this.maxVelocity = 2.0f;
        }
    }