public void DoJutsu(Seal seal) { if (seal == Seal.Attack) { GetComponentInChildren <Animator>().SetTrigger("AttackJutsu"); GetComponent <AudioSource>().PlayOneShot(soundsJutsu[Random.Range(0, 3)]); sealsCombination.Add(Seal.Attack); } else if (seal == Seal.Boar) { GetComponentInChildren <Animator>().SetTrigger("BoarJutsu"); GetComponent <AudioSource>().PlayOneShot(soundsJutsu[Random.Range(0, 3)]); sealsCombination.Add(Seal.Boar); } else if (seal == Seal.Dog) { GetComponentInChildren <Animator>().SetTrigger("DogJutsu"); GetComponent <AudioSource>().PlayOneShot(soundsJutsu[Random.Range(0, 3)]); sealsCombination.Add(Seal.Dog); } else if (seal == Seal.Horse) { GetComponentInChildren <Animator>().SetTrigger("HorseJutsu"); GetComponent <AudioSource>().PlayOneShot(soundsJutsu[Random.Range(0, 3)]); sealsCombination.Add(Seal.Horse); } }
public void Save([FromBody] Seal data) { var model = Core.SealManager.Get(data.ID) ?? data; model.Name = data.Name; Core.SealManager.Save(model); }
static void Main(string[] args) { var radnor = new Forest("Radnor Lake", "Nashville"); var squirrel = new Squirrel("Squirrel", "Patchy") { TailLength = 4 }; var turtle = new Animal { Name = "Turtle", NumberOfLegs = 4, Fur = false }; var mockingbird = new Animal { Name = "Mockingbird", NumberOfLegs = 2, Fur = true }; var bear = new Bear("Yogi", "Blue") { TailLength = 1 }; var seal = new Seal("Sammie"); radnor.AddAnimal(turtle); radnor.AddAnimal(squirrel); radnor.AddAnimal(mockingbird); radnor.AddAnimal(bear); radnor.AddAnimal(seal); radnor.ListAnimals(); }
public Seal DisplaySeal(bool focused = false) { if (!isOwned || seal != null) { return(null); } GameObject sealPrefab = Resources.Load <GameObject>("Prefabs/Seal"); GameObject anchorObj = GameObject.Instantiate <GameObject>(sealPrefab, anchor.position, Quaternion.identity); anchorObj.transform.localScale = new Vector3(sealScale, sealScale, sealScale); seal = anchorObj.GetComponent <Seal>(); if (!seal.Init(sigils.ToArray())) { Destroy(seal); return(null); } if (focused) { seal.Focus(); } if (sigils.Count > 0) { seal.CreateCoreSigil(AspectResources.GetComponentMaterial(sigils[0])); for (int i = 1; i < sigils.Count; i++) { seal.CreateOrbitSigil(AspectResources.GetComponentMaterial(sigils[i])); } } return(seal); }
protected override void OnAppearing() { Task.Run(async() => { await Task.Delay(TimeSpan.FromSeconds(0.5)); Seal.Focus(); }); }
public void Create_ValidData_ReturnsHashedString() { string data = nameof(data); string secretKey = nameof(secretKey); string hash = Seal.Create(data, secretKey); Assert.AreEqual("783d75107b3ce5d2a7a6dc6f8d311edd5154992b625f870965e5c7c543e91ba5", hash); }
public void Unfocus() { selectedSeal = null; if (OnUnfocus != null) { OnUnfocus(); } }
protected override void MovementAnimations() { //base.MovementAnimations(); if (Seal.Alpha > 0) { Seal.RotateTo((float)(Clock.CurrentTime / 1000 * 90)); } }
private void button1_Click(object sender, EventArgs e) { SealCheck.HashChecks(); var response = Seal.Register(txtRegUserName.Text, txtRegPassword.Text, txtReEmail.Text, txtRegCoupon.Text); if (response) { } }
private void Login_Form_Load(object sender, EventArgs e) { SealCheck.HashChecks(); if (SealCheck.isValidDLL) { Seal.Secret = "9cXppSOhiiNuEUcFZpxvhwPTW0b25H1eDH3c4G226XHHN"; Seal.Initialize("1.0"); } }
private void DoBatchDelete() { IList <object> idList = RequestData.GetList <object>("IdList"); if (idList != null && idList.Count > 0) { Seal.DoBatchDelete(idList.ToArray()); } }
private void btnLogin_Click(object sender, EventArgs e) { SealCheck.HashChecks(); var response = Seal.Login(txtLoginUser.Text, txtLoginPassword.Text); if (response) { Hide(); new Form1().Show(); } }
// Start is called before the first frame update void Start() { saveNScene = GameObject.Find("ScriptHolder").GetComponent <SavenSceneLoader>(); box = GetComponent <BoxCollider2D>(); cap = GetComponentInChildren <CapsuleCollider2D>(); rigid = GetComponent <Rigidbody2D>(); sprite = GetComponent <SpriteRenderer>(); ePlace = GetComponent <Transform>(); pPlace = FindObjectOfType <Seal>().transform; seal = FindObjectOfType <Seal>().GetComponent <Seal>(); }
public void DrawPath(Seal.Geometries.IPath path, Seal.Media.IBrush brush) { var p = path as Path; //Здесь стоит проверка, не решит ли пользователь смешать два движка сразу. //Тогда теоретически может быть так, что p будет null, так что лучше проверить. var pBrush = brush as Media.Brush; if (p != null&&pBrush!=null) { _renderTarget.DrawGeometry(p.D2DPath,pBrush.D2DBrush, 1); } }
// sender address public Address Sender() { try { return(Seal.GetPublicKey(SigHash).Address); } catch { return(null); } }
public override void SetShots() { allshots = new IShotType[6]; allshots[0] = new FastShot(1, 0.5f); allshots[1] = new FastShot(3, 0.5f); allshots[2] = new FastShot(5, 0.5f); allshots[3] = new FastFocus(true, 0.9f, 0.2f); allshots[4] = new FastFocus(true, 0.9f, 0.15f); allshots[5] = new FastFocus(true, 0.9f, 0.1f); bomb = new Seal(); }
private bool sealsAre(Seal firstSeal, Seal secondSeal, Seal thirdSeal, Seal fourthSeal) { while (sealsCombination.Count() < 4) { sealsCombination.Add(Seal.Empty); } var seals = sealsCombination.Skip(sealsCombination.Count() - 4).Take(4).ToList(); return(firstSeal == seals[0] && secondSeal == seals[1] && thirdSeal == seals[2] && fourthSeal == seals[3]); }
public override void SetShots() { allshots = new IShotType[6]; allshots[0] = new HomingShot(2, 30, 1.3f); allshots[1] = new HomingShot(4, 30, 1.3f); allshots[2] = new HomingShot(6, 15, 1.3f); allshots[3] = new HomingFocus(2, 5, 1.3f); allshots[4] = new HomingFocus(4, 5, 1.3f); allshots[5] = new HomingFocus(6, 5, 1.3f); bomb = new Seal(); }
static void Main(string[] args) { List <Animal> animalList = new List <Animal>(); /* ----------------------------- Create Animals ----------------------------- */ Animal myGiraf = new Giraf("G"); Animal myElefant = new Elefant("E"); Animal myCoyote = new Coyote("C"); Animal mySeal = new Seal("S"); Animal myBear = new Bear("B"); /* ------------------------- Add animals to the list ------------------------ */ animalList.Add(myGiraf); animalList.Add(myElefant); animalList.Add(myCoyote); animalList.Add(mySeal); animalList.Add(myBear); /* -------------------------------- Day loop -------------------------------- */ int day = 0; while (true) { day++; Console.WriteLine("Det är dag " + day + ":"); Console.WriteLine("-------"); for (int i = 0; i < animalList.Count; i++) { // Loop through the animalList Animal animal = animalList[i]; // Set animal variable for easier understanding animal.IncreaseHungerLevel(); if (animal.isHungry()) // Check if animal is hungry { animal.Eat(); // If hungry then eat animal.PrintEatSummaryToConsole(); // Print an summary on what the animal ate } else { Console.WriteLine("{0} {1} behövde inte äta", animal.animalType, animal.name); // If the animal isnt hungry } } Console.WriteLine(); // Wait for the next day Console.ReadKey(); } }
private IPaymentPostData CreatePostData(IPaymentRequest request) { PaymentRequestValidator.Validate(request); string data = DataString.Create(Configuration, request); string seal = Seal.Create(data, Configuration.SecretKey); return(new PaymentPostData() { Data = data, Seal = seal, }); }
public Transport() { Driver = new Driver(); Delivery = new Delivery(); Loading = new Loading(); Truck = new Truck(); Container = new Container(); Railcar = new Railcar(); Ard = new Ard(); Arrival = new Arrival(); BillOfLading = new BillOfLading(); Carrier = new Carrier(); Weighbridge = new Weighbridge(); Seal = new Seal(); }
private ResourceDescription CreateSealResourceDescription(Seal cimSeal) { ResourceDescription rd = null; if (cimSeal != null) { long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.SEAL, importHelper.CheckOutIndexForDMSType(DMSType.SEAL)); rd = new ResourceDescription(gid); importHelper.DefineIDMapping(cimSeal.ID, gid); ////populate ResourceDescription PowerTransformerConverter.PopulateSealProperties(cimSeal, rd); } return(rd); }
protected void Page_Load(object sender, EventArgs e) { Seal ent = null; switch (RequestActionString) { case "delete": ent = this.GetTargetData <Seal>(); ent.DoDelete(); break; default: DoSelect(); break; } }
static void Main(string[] args) { Animal lion = new Lion(); PrintAnimal(lion); Console.WriteLine(); Animal seal = new Seal(); PrintAnimal(seal); Console.WriteLine(); Animal bear = new Bear(); PrintAnimal(bear); }
string type = String.Empty; // 对象类型 #endregion #region ASP.NET 事件 protected void Page_Load(object sender, EventArgs e) { op = RequestData.Get <string>("op"); id = RequestData.Get <string>("id"); type = RequestData.Get <string>("type"); Seal ent = null; switch (this.RequestAction) { case RequestActionEnum.Update: ent = this.GetMergedData <Seal>(); ent.DoUpdate(); this.SetMessage("修改成功!"); break; case RequestActionEnum.Insert: case RequestActionEnum.Create: ent = this.GetPostedData <Seal>(); ent.DoCreate(); this.SetMessage("新建成功!"); break; case RequestActionEnum.Delete: ent = this.GetTargetData <Seal>(); ent.DoDelete(); this.SetMessage("删除成功!"); return; } if (op != "c" && op != "cs") { if (!String.IsNullOrEmpty(id)) { ent = Seal.Find(id); } this.SetFormData(ent); } }
public void Form1_Load(object sender, EventArgs e) { this.Opacity = 0D; SealCheck.HashChecks(); if (SealCheck.isValidDLL) { { Prch = 1; Seal.InitializeForm( "Your_key", "Version", "VariableSecretKey", this, new MainForm(), SealColours.Purple); } } else { Prch = 0; } }
public void Focus() { Transform playTransform = VRTK_DeviceFinder.PlayAreaTransform(); GameObject[] magicObjects = GameObject.FindGameObjectsWithTag("MagicObject"); MagicObject selectedObject = null; float smallestDistance = float.PositiveInfinity; foreach (GameObject obj in magicObjects) { MagicObject script = obj.GetComponent <MagicObject>(); if (script == null || !script.isOwned) { continue; } float distance = Vector3.Distance(playTransform.position, script.transform.position); if (distance > 4f || distance > smallestDistance) { continue; } selectedObject = script; smallestDistance = distance; } if (selectedObject != null) { selectedSeal = selectedObject.DisplaySeal(true); leftSealControls.ResetSavedVectors(); rightSealControls.ResetSavedVectors(); } if (OnFocus != null) { OnFocus(); } }
public ActionResult Index(string category) { if (category == "select") { category = null; } string requestURL = assembleRequestUrl(category); // Create web request string solrSearchResponse = webRequest(requestURL); // Parse results JObject parsedResults = JObject.Parse(solrSearchResponse); IList <JToken> results = parsedResults["response"]["docs"].Children().ToList(); // Serialize JSON results into .NET objects List <Seal> resultsList = new List <Seal>(); foreach (JToken result in results) { // JToken.ToObject is a helper method that uses JsonSerializer internally Seal searchResult = result.ToObject <Seal>(); resultsList.Add(searchResult); } resultsList.Sort(); IEnumerable <Seal> searchList = resultsList; SealViewModel viewModel = new SealViewModel(searchList); return(this.View("Default", viewModel)); }
public static void PopulateSealProperties(Seal cimSeal, ResourceDescription rd) { if ((cimSeal != null) && (rd != null)) { PowerTransformerConverter.PopulateIdentifiedObjectProperties(cimSeal, rd); if (cimSeal.AppliedDateTimeHasValue) { rd.AddProperty(new Property(ModelCode.SEAL_APPLIEDTIME, cimSeal.AppliedDateTime)); } if (cimSeal.ConditionHasValue) { rd.AddProperty(new Property(ModelCode.SEAL_CONDITION, (short)cimSeal.Condition)); } if (cimSeal.KindHasValue) { rd.AddProperty(new Property(ModelCode.SEAL_KIND, (short)cimSeal.Kind)); } if (cimSeal.SealNumberHasValue) { rd.AddProperty(new Property(ModelCode.SEAL_SEALNUMBER, cimSeal.SealNumber)); } } }
//Consider moving Seed values to config file public async Task Seed() { _dbContext.Database.EnsureDeleted(); _dbContext.Database.Migrate(); if (!(await _dbContext.Users.AnyAsync())) { var organization = new Organization { Name = "iSeal" }; _dbContext.Organizations.Add(organization); var seal = new Seal { SyncKey = "asfbkqbriq2uh39fh103u^%#!@sfd", Organization = organization }; _dbContext.Seals.Add(seal); _dbContext.SaveChanges(); var user = new User { UserName = "******", Email = "*****@*****.**", Organization = organization }; await _userManager.CreateAsync(user, "!se4lP4ss"); var adminUser = await _userManager.FindByEmailAsync("*****@*****.**"); await _userManager.AddClaimAsync(adminUser, new Claim(ClaimTypes.Role, "admin")); } }
public void DrawGeometry(Seal.Geometries.IGeometry g, Seal.Geometries.GeometryType type) { throw new NotImplementedException(); }
public void Save(Seal model) { DB.Seals.AddOrUpdate(model); DB.SaveChanges(); }