public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { base.OnStateEnter(animator, stateInfo, layerIndex); if (alertIndicatorPrefab) { alertIndicator = Instantiate(alertIndicatorPrefab); alertIndicator.transform.SetParent(aiController.transform, false); } }
private void Awake() { if (instance == null) { instance = this; } if (instance != this) { Destroy(gameObject); } gameObject.SetActive(false); }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } if (ConfigurationManager.AppSettings.GetValues("CachePages")[0].Equals("false")) { Response.CacheControl = "no-cache"; Response.AddHeader("Pragma", "no-cache"); Response.Expires = -1; } AddIE6PngBugFixCSS(); if (SessionManager.Current != null) { CustomIdentity id = SessionManager.Current.User.Identity as CustomIdentity; if (DisplayUserInformationPanel) { if (id != null) { Username.Text = id.DisplayName; } else { Username.Text = "unknown"; } try { AlertIndicator alertControl = (AlertIndicator)LoadControl("~/Controls/AlertIndicator.ascx"); AlertIndicatorPlaceHolder.Controls.Add(alertControl); } catch (Exception) { //No permissions for Alerts, control won't be displayed //hide table cell that contains the control. AlertIndicatorCell.Visible = false; } } else { UserInformationCell.Width = Unit.Percentage(0); MenuCell.Width = Unit.Percentage(100); } } }