KillingGame.CrimeScene.CrimeObject.OnCancelThis C# (CSharp) Method

OnCancelThis() public method

public OnCancelThis ( ) : void
return void
        public void OnCancelThis()
        {
            if (!isItem)
                GetComponent<SpriteRenderer>().sprite = _baseSprite;
            foreach (GameObject button in selectButtons)
            {
                button.GetComponent<SelectableButton>().crimeObject = null;
                button.GetComponent<SelectableButton>().selectable = null;
                button.SetActive(false);
            }
            if (!CrimeManager.Instance.messageHolder.activeSelf || !CrimeManager.Instance.spriteShower.activeSelf)
                CrimeManager.Instance.isGUI = false;
        }

Usage Example

コード例 #1
0
 void OnMouseDown()
 {
     if (selectable)
     {
         selectable.ExecuteSelect();
     }
     crimeObject.OnCancelThis();
 }