Function.SetMarked C# (CSharp) Method

SetMarked() public method

public SetMarked ( bool state ) : void
state bool
return void
    public void SetMarked(bool state)
    {
        if (state == true && !marked) {
            halo = Instantiate (controller.markPrefab, transform.localPosition, Quaternion.identity) as markHalo;
            marked = true;
        } else if (state == false && marked) {
            Destroy (halo.gameObject);
            marked = false;
        }
    }

Usage Example

示例#1
0
 private void ChangeMark(string text)
 {
     Debug.Log("ChangeMark(): text = " + text);
     if (text != null && text.Length > 0)
     {
         node.SetMarked(true);
     }
     else
     {
         node.SetMarked(false);
     }
     node.mark = text;
     controller.HideMark();
     controller.SetInputActive(true);
 }