コード例 #1
0
    void Start()
    {
        //Stores reference to default child, destroys the child's rigidbody
        if (!child)
        {
            child = transform.GetChild(0).gameObject;
            Destroy(child.GetComponent<Rigidbody2D>());
        }

        source = gameObject.AddComponent<AudioSource>();
        source.loop = false;

        composition = "CH4";
        pressure = ReactionTableEntry.Pressure.lo;
        temperature = ReactionTableEntry.Temperature.lo;
    }
コード例 #2
0
 public void SetPressure(ReactionTableEntry.Pressure pressure)
 {
     this.pressure = pressure;
 }