void Awake() { children = new List <GameObject>(); foreach (Transform child in transform) { children.Add(child.gameObject); } VisualEncryptorAgent.SetSprites(children); }
void Awake() { if( mInstance != null ) { Debug.LogError( string.Format( "Only one instance of VisualEncryptorAgent allowed! Destroying:" + gameObject.name +", Other:" + mInstance.gameObject.name ) ); Destroy( gameObject ); return; } mInstance = this; }
void Awake() { if (mInstance != null) { Debug.LogError(string.Format("Only one instance of VisualEncryptorAgent allowed! Destroying:" + gameObject.name + ", Other:" + mInstance.gameObject.name)); Destroy(gameObject); return; } mInstance = this; }
void OnEnable() { content = "Find a friend!"; int monID = MonAgent.GetCurrentMonID(); if (monID != -1) { content = MonAgent.MonFromID(monID).ToString(); } VisualEncryptorAgent.DisplaySprite(monID); }