public override void OnClick() { Debug.Log(name + ":Clicked"); if (DL != null) { if (mListItem == null) { mListItem = DL.AddObject(this); } else { DL.RemoveObject(mListItem); mListItem = null; } } }
public override void OnClick() { Debug.Log(name + ":Clicked"); if (DL != null) { if (mListItem == null) { mListItem = DL.AddObject(this); //Add object to list if not there } else { DL.RemoveObject(mListItem); //Remove if its there mListItem = null; } Throw = Quaternion.Euler(Random.Range(-10f, 10f), 0, Random.Range(-10f, 10f)) * Vector3.up * Random.Range(1f, 10f); Twist = Random.Range(1f, 10f); //Throw Card up and spin } }