Esempio n. 1
0
    private void TouchpadDown()
    {
        bool direction = (_touchValue.x > 0.0f) ? true : false;

        Debug.Log("direction: " + direction);
        CreatureManagerChemistry.setMagneticField(direction);
    }
Esempio n. 2
0
    // function to call when user pulls trigger
    private void TriggerDown()
    {
        currentSeed += 1;
        UnityEngine.Random.InitState(currentSeed);
        GameObject myMesh;

        if (UnityEngine.Random.value > 0.5f)
        {
            myMesh = GameObject.Instantiate(prefabProton, new Vector3(0, 0, 0), Quaternion.identity) as GameObject;
        }
        else
        {
            myMesh = GameObject.Instantiate(prefabElectron, new Vector3(0, 0, 0), Quaternion.identity) as GameObject;
        }
        Debug.Log("Object instantiated");

        CreatureManagerChemistry.AddParticle(myMesh);
    }
Esempio n. 3
0
 private void BackDown()
 {
     CreatureManagerChemistry.deleteEverything();
 }