Пример #1
0
 public static void Init(Map map)
 {
     rockNoises = new List <RockNoise>();
     foreach (ThingDef item in Find.World.NaturalRockTypesIn(map.Tile))
     {
         RockNoise rockNoise = new RockNoise();
         rockNoise.rockDef = item;
         rockNoise.noise   = new Perlin(0.004999999888241291, 2.0, 0.5, 6, Rand.Range(0, int.MaxValue), QualityMode.Medium);
         rockNoises.Add(rockNoise);
         NoiseDebugUI.StoreNoiseRender(rockNoise.noise, string.Concat(rockNoise.rockDef, " score"), map.Size.ToIntVec2);
     }
 }
Пример #2
0
    /*	void OnGUI () {
     *      // Make a background box
     *      GUI.Box(new Rect(10,10,100,90), "Scenarios");
     *
     *      GUI.enabled = isTexturedScene;
     *
     *      // Make the first button. If it is pressed, Application.Loadlevel (1) will be executed
     *      if(GUI.Button(new Rect(20,40,80,20), "No Texture")) {
     *              SetupSimpleScene1();
     *      }
     *      GUI.enabled = true;
     *
     *      GUI.enabled = !isTexturedScene;
     *      // Make the second button.
     *      if(GUI.Button(new Rect(20,70,80,20), "Textured")) {
     *              SetupSimpleScene2();
     *      }
     *      GUI.enabled = true;
     * }*/
    // Update is called once per frame
    void Update()
    {
        if (isGrounded)
        {
            rockNoise = GameObject.Find("ThrownRock(Clone)").GetComponent <RockNoise>();
            rock      = GameObject.Find("ThrownRock(Clone)");
        }
        deltaTime += Time.deltaTime;

        UpdateRayCast();
        UpdateEcho();
        UpdateShader();
    }
Пример #3
0
 // Update is called once per frame
 void Update()
 {
     if (isGrounded)
     {
         rockNoise = GameObject.Find("ThrownRock(Clone)").GetComponent <RockNoise>();
         rock      = GameObject.Find("ThrownRock(Clone)");
     }
     if (EchoMaterial == null)
     {
         return;
     }
     foreach (EchoSphere2 es in Spheres)
     {
         es.Update();
     }
     UpdateRayCast();
 }