bool display = false; //プレイヤーがクリックされた際の表示非表示を切り替えるための変数 // Use this for initialization void Start() { //----------------------------------------------------------------------------------------------------------------- //当たり判定オブジェクト取得 //----------------------------------------------------------------------------------------------------------------- Up = GameObject.Find("Player/Up"); Down = GameObject.Find("Player/Down"); Right = GameObject.Find("Player/Right"); Left = GameObject.Find("Player/Left"); //----------------------------------------------------------------------------------------------------------------- //当たり判定のスクリプト取得 //----------------------------------------------------------------------------------------------------------------- Uscript = GameObject.Find("Up").GetComponent <UP>(); Dscript = GameObject.Find("Down").GetComponent <DOWN>(); Rscript = GameObject.Find("Right").GetComponent <RIGHT>(); Lscript = GameObject.Find("Left").GetComponent <LEFT>(); //----------------------------------------------------------------------------------------------------------------- //矢印オブジェクト取得 //----------------------------------------------------------------------------------------------------------------- UpArrow = GameObject.Find("UpArrow"); DownArrow = GameObject.Find("DownArrow"); RightArrow = GameObject.Find("RightArrow"); LeftArrow = GameObject.Find("LeftArrow"); //----------------------------------------------------------------------------------------------------------------- //初期化 //----------------------------------------------------------------------------------------------------------------- Ctrigger = false; //クリック判定初期化 direction = 0; //向き変数の初期化 }
private static bool HasRight(USER user, RIGHT right) { if (user.ISADMIN.HasValue && user.ISADMIN.Value) { return(true); } var uId = user.ID; var rId = right.ID; using (var en = new HaushaltsrechnerEntities()) { return(en.USER.Any(u => u.ID == uId && u.RIGHT.Any(r => r.ID == rId))); } }
static public bool Helper_RightEnforcement(Guid userID, string securableType, RIGHT right) { XORCISMModel.XORCISMEntities model; model = new XORCISMModel.XORCISMEntities(); if (model.USERACCOUNT.FirstOrDefault(o => o.UserID == userID && o.UserAccountTypeID == 1) != null) //TODO Hardcoded "Administrator" { return(true); } List <string> listRACI; listRACI = new List <string>(); switch (right) { case RIGHT.CREATE: listRACI.Add("R"); break; case RIGHT.MODIFY: listRACI.Add("R"); listRACI.Add("A"); listRACI.Add("C"); break; case RIGHT.DELETE: listRACI.Add("R"); listRACI.Add("A"); break; case RIGHT.VIEW: listRACI.Add("R"); listRACI.Add("A"); listRACI.Add("C"); listRACI.Add("I"); break; } foreach (string raci in listRACI) { //RACISECURABLE raciSecurable; //raciSecurable = model.RACISECURABLE.FirstOrDefault(o => o.UserID == userID && o.SecurableType == securableType && o.RACIValue == raci); //if (raciSecurable != null) return(true); } return(false); }
public static object Insert(RIGHT t) { return(BaseDA.Insert <RIGHT>("InsertRIGHT", t)); }
public static int Update(RIGHT t) { return(BaseDA.Update <RIGHT>("UpdateRIGHT", t)); }
public void Right() { RIGHT.Invoke(this, EventArgs.Empty); }