public override void ReceivedMover(Mover m) { base.ReceivedMover (m); if (Random.value > 0.5f) { Spawn (pingPrefab); } }
// ------------------------------------------------- public Form_OneMovablePlot () { InitializeComponent (); mover = new Mover (this); CreateInfo (12, 470); }
// ------------------------------------------------- public Form_RingSets () { InitializeComponent (); mover = new Mover (this); CreateInfo (12, 470); }
// ------------------------------------------------- public Form_BoardsAndBalls () { InitializeComponent (); mover = new Mover (this); //Font = new Font ("Times New Roman", 14); clrFrameLR = Auxi_Colours .IntermediateClr (0.7, BackColor, ControlPaint .Dark (BackColor)); penFrameLR = new Pen (clrFrameLR); sizefStrs = Auxi_Geometry .MeasureStrings (this, strs); hStr = Convert .ToInt32 (sizefStrs [0] .Height); spaces = new Spaces (hStr); lrNew = new LinkedRectangles (new Control [] { numericUD_Balls, checkSameSize, buttonAdd }); int cxL = numericUD_Balls .Left - spaces .Left_inFrame; int cyT = numericUD_Balls .Top - spaces .Top_inFrame; int cxR = buttonAdd .Right + spaces .Right_inFrame; int cyB = buttonAdd .Bottom + spaces .Btm_inFrame; Rectangle rcArea = new Rectangle (cxL, cyT, cxR - cxL, cyB - cyT); rcArea .Inflate (3, 3); lrNew .Add (rcArea, "Area"); rand = Auxi_Common .RandomByCurTime (out nSeed); boards .Add (new BoardWithBalls (this, new Rectangle (40, 70, 400, 300), Color .White, 5, false, new Font ("Times New Roman", 14, FontStyle .Bold | FontStyle .Italic), Color .Blue)); info = new TextM (this, new Point (200, 400), cmnts); info .ShowBackground = false; comboCase .SelectedIndex = 0; RenewMover (); }
// ------------------------------------------------- public Form_InfinitiveLoop () { InitializeComponent (); mover = new Mover (this); //Font = new Font ("Times New Roman", 14); sizefStrs = Auxi_Geometry .MeasureStrings (this, strs); hStr = Convert .ToInt32 (sizefStrs [0] .Height); Prepare_lrsView (); text = new TextMR (this, new Point (450, 100), "Figure - moved by strips, reconfigured by circles\r\n" + "Group and text - moved by any inner point"); ptPolygonCenter = NewPolygonCenter; view = View .ReverseCover; comboView .SelectedIndex = Convert .ToInt32 (view); rand = Auxi_Common .RandomByCurTime (out nSeed); numericUD_Points .Value = (numericUD_Points .Minimum + numericUD_Points .Maximum) / 2; numericUD_Radius .Value = 15; numericUD_HalfStrip .Value = 5; int nPoints = Convert .ToInt32 (numericUD_Points .Value); Point [] pts = new Point [nPoints]; for (int i = 0; i < pts .Length; i++) { pts [i] = new Point (notCloser + rand .Next (nSeed) % (ClientSize .Width - 2 * notCloser), notCloser + rand .Next (nSeed) % (ClientSize .Height - 2 * notCloser)); } loop = new InfinitiveLoop (pts, Convert .ToInt32 (numericUD_Radius .Value), Convert .ToInt32 (numericUD_HalfStrip .Value), Color .Blue, Color .Yellow); RenewMover (); bAfterInit = true; }
// ------------------------------------------------- public Form_MultiScalePlot () { InitializeComponent (); mover = new Mover (this); CreateInfo (420, 12); }
private void handleRightClick(Mover hoverTarget) { if(Input.GetMouseButtonDown(1)) { target = hoverTarget; Vector3 endPos; if(target == null) { endPos = getMousePosition (); int[] coords = Map.map.worldToMapPoint(endPos); if(Map.map.tiles[coords[0], coords[1]] == 1) { findPath(endPos); } } if(target != null && target.tag == "Enemy") { enemyHealth = target.GetComponent<HealthBar>(); Enemy1 e = target as Enemy1; if(e.isDead()) { e.IAmBeingEaten = true; AudioSource.PlayClipAtPoint(suckClip, Camera.main.transform.position); } } else { enemyHealth = null; } } }
/// <summary> /// Initializes a new instance of the <see cref="LinkTree"/> class. /// </summary> /// <param name="mover">The mover.</param> /// <param name="src">The SRC.</param> /// <param name="tar">The tar.</param> public LinkTree(Mover mover, LinkedTreeview src, LinkedTreeview tar) { this.mover = mover; this.tvLinkedTar = tar; this.tvLinkedSrc = src; lstLinkedNodes = new List<LinkNode>(); }
// ------------------------------------------------- public Form_TextSamples () { InitializeComponent (); mover = new Mover (this); string str = Auxi_Common .strElvishSong [0]; for (int i = 1; i <= 15; i++) { if (i % 2 == 0) { str += "\r\n"; } str += Auxi_Common .strElvishSong [i]; } textABC = new TextMR (this, new Point (60, ClientSize .Height / 2), strABC, new Font ("Microsoft Sans Serif", 22, FontStyle .Bold), Color .Magenta); textRhyme = new TextMR (this, new Point (360, ClientSize .Height / 3), str, new Font ("Times New Roman", 12, FontStyle .Italic), Color .DarkGreen); string strNames = Auxi_Common .strNames [0]; for (int i = 1; i < 6; i++) { strNames += ", " + Auxi_Common .strNames [i]; } textNames = new TextMR (this, new Point (300, 350), strNames, 12, Color .Blue); mover .Add (textABC); mover .Add (textRhyme); mover .Add (textNames); mover .Insert (0, btnCovers); }
// ------------------------------------------------- public Form_RegPolyWithComments () { InitializeComponent (); mover = new Mover (this); //Font = new Font ("Times New Roman", 14); string strTitle = "New comment"; spaces = new Spaces (Convert .ToInt32 (Auxi_Geometry .MeasureString (this, strTitle) .Height)); clrComment = Color .Blue; fontComment = Font; textNewComment .ForeColor = clrComment; textNewComment .Font = fontComment; polygon = new RegPolyWithComments (Auxi_Geometry .Middle (ClientRectangle), 140, 7, 0, Color .Yellow); btnCommentFont .Location = new Point (btnCommentClr .Right, btnCommentClr .Top); btnAdd .Location = new Point (btnCommentFont .Right + spaces .HorMin, btnCommentClr .Top); int minH_textNewComment = 60; textNewComment .Bounds = new Rectangle (btnCommentClr .Left, btnCommentClr .Top - (spaces .VerMin + minH_textNewComment), btnAdd .Right - btnCommentClr .Left, minH_textNewComment); Rectangle rcFrame = Auxi_Geometry .FrameAroundControls (new Control [] { textNewComment, btnCommentClr, btnCommentFont, btnAdd }, spaces); groupNewCmnt = new Group (this, rcFrame, new RectRange (rcFrame .Width, 4 * rcFrame .Width, rcFrame .Height, 3 * rcFrame .Height), strTitle, MoveNewGroup); string [] cmnts = new string [] {"Comments ", "- add, move, rotate", "Polygon ", "- move, rotate, resize", "Group ", "- move, resize, use", }; info = new TwoColumnInfo (this, new Point (300, 350), cmnts); RenewMover (); }
public static bool planifyRoute(Mover mover, Cell destination, int distance) { if (routes.ContainsKey(mover)) { //return false; Stack<Cell> ruta = calculateRoute(routes[mover].Peek(), destination, mover, distance); //Stack<Cell> ruta = new Stack<Cell>(); //ruta.Push (destination); ruta.Push(routes[mover].Peek()); routes[mover] = ruta; return ruta != null; }else{ /*Stack<Cell> ruta = new Stack<Cell>(); ruta.Push (destination);*/ Stack<Cell> ruta = calculateRoute(mover.Entity.Position, destination, mover, distance); if(ruta!=null){ ruta.Push(mover.Entity.Position); //ruta.Pop(); //Quito en la que estoy routes.Add(mover, ruta); } return ruta!=null; } }
private void mapPanel_Paint(object sender, PaintEventArgs e) { _listener = new Listener(Listener.EntryThreadPoint); var tmp = mapPanel.CreateGraphics(); _player = new PointDrawer(ref tmp); _mover = new Mover(_player, ref pingScrollBar); mapPanel.Paint -= mapPanel_Paint; }
// ------------------------------------------------- public Form_ManyPlots () { InitializeComponent (); mover = new Mover (this); //Font = new Font ("Times New Roman", 14); CreateInfo (12, 420); }
public virtual void Spawn(Mover pfb) { Mover m = pfb.Spawn(transform.position, transform.rotation); m.nextNode = this; m.Go (target); BroadcastMessage ("OnSpawn", SendMessageOptions.DontRequireReceiver); }
// ------------------------------------------------- public Form_Medley () { InitializeComponent (); mover = new Mover (this); //Font = new Font ("Times New Roman", 14); CreateInfo (12, 590); }
// Use this for initialization public override void Start() { base.Start(); GameObject playerGO = GameObject.Find("Player"); player = playerGO.GetComponent<Mover>(); playerHealth = player.GetComponent<HealthBar>(); }
public void Hide() { if(moving) return; readyToShow = false; moving = true; movet = 0; anim = HideComponents; }
// ------------------------------------------------- public Form_LinkedElements () { InitializeComponent (); mover = new Mover (this); //Font = new Font ("Times New Roman", 14); rand = Auxi_Common .RandomByCurTime (out nSeed); spaces = new Spaces (Convert .ToInt32 (Auxi_Geometry .MeasureString (this, strChatPolyText [0]) .Height)); // dfRegPoly string [] strs = new string [] { "Sides", "Color" }; Size [] sizeStrs = Auxi_Geometry .RoundMeasureStrings (this, strs); CommentedControl ccSides = new CommentedControl (this, numericUD_RegSides, 4 + sizeStrs [0] .Width / 2, 0.5, strs [0]); CommentedControl ccColor = new CommentedControl (this, panelRegPolyClr, 4 + sizeStrs [1] .Width / 2, 0.5, strs [1]); List<ElementInsideDependentFrame> elems = new List<ElementInsideDependentFrame> (); elems .Add (new ElementInsideDependentFrame (ccSides)); elems .Add (new ElementInsideDependentFrame (ccColor)); elems .Add (new ElementInsideDependentFrame (new FramedControl (btnAddRegPoly))); dfRegPoly = new DependentFrame (this, elems, spaces, "Regular polygon"); // lrsCircle lrsCircle = new LinkedRectangles (new Control [] { btnCircleClr, panelCircleSample, btnAddCircle }); sizeStrs = Auxi_Geometry .RoundMeasureStrings (this, strCircle); lrsCircle .Add (new Rectangle (btnCircleClr .Left, btnCircleClr .Top - (sizeStrs [0] .Height + 4), sizeStrs [0] .Width, sizeStrs [0] .Height), "Title"); int cyT = (panelCircleSample .Top + panelCircleSample .Bottom) / 2 - sizeStrs [1] .Height / 2; lrsCircle .Add (new Rectangle (panelCircleSample .Right + 4, cyT, sizeStrs [1] .Width, sizeStrs [1] .Height), "ColorLabel"); lrsCircle .Add (new Rectangle (panelCircleSample .Right, cyT, btnAddCircle .Right - panelCircleSample .Right, btnAddCircle .Top - cyT)); InGroupRelativePosition (); Rectangle rc = Auxi_Geometry .FrameAroundControls (new Control [] {numericUD_ChatApexes, btnStartPolyClr, btnEndPolyClr, btnChatPolyCenterClr, panelChatPolyCenterSample, btnAddChatPoly }, spaces); groupChatPoly = new Group (this, rc, strChatPolyText [0], MoveChatPolyGroup); mover .Insert (0, buttonCovers); dfRegPoly .IntoMover (mover, 0); mover .Insert (0, lrsCircle); mover .Insert (0, groupChatPoly); info = new TextM (this, new Point (210, 170), "Different classes are used to add the new colored figures:\n" + " regular polygons are added via the DependentFrame class,\n" + " circles are added via the LinkedRectangles class,\n" + " chatoyant polygons are added via the Group class.\n" + "All colored figures can be moved (L_Press inside) and\n" + "resized (L_Press on border); chatoyant polygons can be also\n" + "rotated (R_Press) and reconfigured (L_Press on apexes).\n" + "L_Click any colored figure to popup it.", new Font ("Microsoft Sans Serif", 9)); info .BackColor = Color .Yellow; mover .Add (info); iTopElemOrder = mover .Count; panelRegPolyClr .BackColor = clrNewRegPoly; panelCircleSample .BackColor = clrNewCircle; panelChatPolyCenterSample .BackColor = clrChatPolyCenter; }
//Give mover a pict public Pict CreatePict(Mover m) { Pict pict; pict = new Pict(); PictAndId(pict,m.Id); pict.Height = pict.Image.Size.Height; pict.Width = pict.Image.Size.Width; return pict; }
void Awake() { if (player == null) { target = GameObject.FindGameObjectWithTag("Player"); player = target.GetComponent<PlayerController>(); } _playerMover = player.GetComponent<Mover>(); _playerTransform = player.transform; }
// ------------------------------------------------- public Form_ChatoyantPolygons () { InitializeComponent (); mover = new Mover (this); text = new TextMR (this, new Point (300, 80), info, new Font ("Courier New", 9)); rand = Auxi_Common .RandomByCurTime (out nSeed); NewSet (); RenewMover (); }
void HandleDisplayLetter(object o, DisplayLetterEventArgs e) { if(moving)return; gm.OverlayGUIFuncs += DrawStudent; gm.OverlayGUIFuncs += textbox.GetUIDrawDelegate(); textbox.SetText(e.Letter); moving = true; movet = 0; anim = ShowComponents; }
void Start() { inputs = new float[1]; neuralNetwork = gameObject.AddComponent<NeuralNetwork>(); neuralNetwork.inputs = inputs; neuralNetwork.nbOutputs = 1; trainer = gameObject.AddComponent<RPropTrainer>(); mover = GetComponent<Mover>(); errors = new float[neuralNetwork.nbOutputs]; }
// ------------------------------------------------- public Form_CombiRegularPolygons () { InitializeComponent (); mover = new Mover (this); text = new TextM (this, new Point (300, 80), cmnts); rand = Auxi_Common .RandomByCurTime (out nSeed); NewSet (); RenewMover (); }
// Use this for initialization void Start () { spriteAnimator = GetComponent<tk2dSpriteAnimator> (); mTk2dSprite = GetComponent<tk2dSprite> (); mover = GetComponent<Mover> (); setEvolutionPoint (); backGroundKeeper.UpdateBackGround (evolutionPoint); SetVoiceAudioClip (); SetAnimationObject (); animationObject.SetActive (false); StartIdleAnimation (); }
// ------------------------------------------------- public Form_RegularPolygons () { InitializeComponent (); mover = new Mover (this); comboPolygonType .SelectedIndex = (int) polytype; rand = Auxi_Common .RandomByCurTime (out nSeed); NewSet (); RenewMover (); bAfterInit = true; }
public void use(Mover hoverTarget) { if (hoverTarget != null) { GameManager.Instance.setCursor ("targetEnemyCursor"); } else { GameManager.Instance.setCursor ("disabledTargetCursor"); } if (Input.GetMouseButtonDown (0) || Input.GetMouseButtonDown (1)) { player.currentAbility = null; } }
protected override void Start() { healthEffectOfWater = whatThisSpawns.GetComponent<HealthAffector>(); waterDropMover = whatThisSpawns.GetComponent<Mover>(); waterSourceSpriteRenderer = gameObject.GetComponent<SpriteRenderer>(); waterDropSpriteRenderer = whatThisSpawns.GetComponent<SpriteRenderer>(); dirtyColor = new Color(0.4f, 0.2f, 0.0f); base.Start(); }
// ------------------------------------------------- public Form_BarCharts () { InitializeComponent (); //Font = new Font ("Times New Roman", 14); mover = new Mover (this); CreateInfo (440, 12); sizefLabels = Auxi_Geometry .MeasureStrings (this, labels); ListOfColors (); strformatCenterCenter .Alignment = StringAlignment .Center; strformatCenterCenter .LineAlignment = StringAlignment .Center; }
// ------------------------------------------------- public Form_NameView_ATP (List<PersonalInfoView_ATP> viewsSrc) { InitializeComponent (); mover = new Mover (); views = viewsSrc; listUsedNames .Columns [0] .Width = listUsedNames .Width - (SystemInformation .VerticalScrollBarWidth + 4); ShowUsedNames (); RestoreFromRegistry (); ccNewName = new CommentedControl (this, textNewName, 0.5, -12, "New name"); RenewMover (); }
void Start() { mover = gameObject.GetComponent <Mover>(); ObjectToMoveTo = GameObject.FindGameObjectWithTag("Survivor"); target = ObjectToMoveTo.transform; }
void Awake() { mover = GetComponent <Mover>(); health = GetComponent <Health>(); defaultMapping = cursorMappings[0]; }
public override void Move() { Mover.Move(); }
// private float cycleLength = 0.3f; //private Transform rend; public WalkingAction(State s) : base(s) { rigid = ownerState.GetComponent <Rigidbody2D>(); mover = ownerState.GetComponent <Mover>(); //rend = ownerState.GetComponentInChildren<SpriteRenderer>().gameObject.transform; }
private void Awake() { pickup = GetComponent <Pickup>(); player = GameObject.FindGameObjectWithTag("Player"); mover = player.GetComponent <Mover>(); }
void Awake() { mover = GetComponent <Mover>(); rb = GetComponent <Rigidbody>(); }
private void Start() { mover = GetComponent <Mover>(); EquipWeapon(defaultWeapon); }
void Awake() { mover = GetComponent <Mover>(); fighter = GetComponent <Fighter>(); player = GetComponent <Health>(); }
// the one parameter is the BCeID guid for an individual. static void Main(string[] args) { bool isObfuscate = false; bool isClean = false; bool isApplicationClean = false; bool isImport = false; bool isMove = false; bool isDetectBadAccountData = false; bool isFixBadAccountData = false; // start by getting secrets. var builder = new ConfigurationBuilder() .AddEnvironmentVariables() .AddUserSecrets <Program>(); var Configuration = builder.Build(); string basepath = Directory.GetParent(Directory.GetCurrentDirectory()).ToString(); basepath = Directory.GetParent(basepath).ToString(); basepath = Directory.GetParent(basepath).ToString(); basepath = Directory.GetParent(basepath).ToString(); basepath = Directory.GetParent(basepath).ToString(); basepath = Directory.GetParent(basepath).ToString(); basepath = Directory.GetParent(basepath).ToString(); basepath += "\\data"; string rawbase = basepath + "\\raw"; string exportbase = basepath + "\\export"; if (args.Length > 0) { string arg = args[0]; if (!string.IsNullOrEmpty(arg)) { if (arg.ToLower().Equals("obfuscate")) { isObfuscate = true; Console.Out.WriteLine("Data obfuscation enabled"); } else if (arg.ToLower().Equals("import")) { isImport = true; Console.Out.WriteLine("Data import enabled"); } else if (arg.ToLower().Equals("detect-bad-account-data")) { isDetectBadAccountData = true; Console.Out.WriteLine("detect-bad-account-data enabled"); } else if (arg.ToLower().Equals("fix-bad-account-data")) { isFixBadAccountData = true; Console.Out.WriteLine("fix-bad-account-data enabled"); } else { Console.Out.WriteLine("USAGE - enter the obfuscate parameter to obfuscate data"); } } } if (isObfuscate) { var obfuscator = new Obfuscator( ContactMap, AccountMap, WorkerMap, AliasMap, InvoiceMap, LicenceMap, ApplicationMap, EstablishmentMap, LegalEntityMap, LocalgovindigenousnationMap ); string filename = $"{rawbase}\\accounts.json"; List <MicrosoftDynamicsCRMaccount> accounts = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMaccount> >(File.ReadAllText(filename)); filename = $"{rawbase}\\contacts.json"; List <MicrosoftDynamicsCRMcontact> contacts = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMcontact> >(File.ReadAllText(filename)); filename = $"{rawbase}\\adoxio_aliases.json"; List <MicrosoftDynamicsCRMadoxioAlias> adoxio_aliases = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMadoxioAlias> >(File.ReadAllText(filename)); filename = $"{rawbase}\\adoxio_applications.json"; List <MicrosoftDynamicsCRMadoxioApplication> adoxio_applications = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMadoxioApplication> >(File.ReadAllText(filename)); filename = $"{rawbase}\\adoxio_establishments.json"; List <MicrosoftDynamicsCRMadoxioEstablishment> adoxio_establishments = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMadoxioEstablishment> >(File.ReadAllText(filename)); filename = $"{rawbase}\\adoxio_legalentities.json"; List <MicrosoftDynamicsCRMadoxioLegalentity> adoxio_legalEntities = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMadoxioLegalentity> >(File.ReadAllText(filename)); filename = $"{rawbase}\\adoxio_licences.json"; List <MicrosoftDynamicsCRMadoxioLicences> adoxio_licences = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMadoxioLicences> >(File.ReadAllText(filename)); filename = $"{rawbase}\\adoxio_workers.json"; List <MicrosoftDynamicsCRMadoxioWorker> adoxio_workers = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMadoxioWorker> >(File.ReadAllText(filename)); filename = $"{rawbase}\\invoices.json"; List <MicrosoftDynamicsCRMinvoice> invoices = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMinvoice> >(File.ReadAllText(filename)); // obfuscate the data. var o_accounts = obfuscator.ObfuscateAccounts(accounts); var o_contacts = obfuscator.ObfuscateContacts(contacts); var o_aliases = obfuscator.ObfuscateAliases(adoxio_aliases); var o_invoices = obfuscator.ObfuscateInvoices(invoices); var o_establishments = obfuscator.ObfuscateEstablishments(adoxio_establishments); var o_applications = obfuscator.ObfuscateApplications(adoxio_applications); var o_workers = obfuscator.ObfuscateWorkers(adoxio_workers); var o_licences = obfuscator.ObfuscateLicences(adoxio_licences); var o_legalentities = obfuscator.ObfuscateLegalEntities(adoxio_legalEntities); // now save the data filename = $"{exportbase}\\accounts.json"; File.WriteAllText(filename, JsonConvert.SerializeObject(o_accounts)); filename = $"{exportbase}\\contacts.json"; File.WriteAllText(filename, JsonConvert.SerializeObject(o_contacts)); filename = $"{exportbase}\\adoxio_aliases.json"; File.WriteAllText(filename, JsonConvert.SerializeObject(o_aliases)); filename = $"{exportbase}\\adoxio_applications.json"; File.WriteAllText(filename, JsonConvert.SerializeObject(o_applications)); filename = $"{exportbase}\\adoxio_establishments.json"; File.WriteAllText(filename, JsonConvert.SerializeObject(o_establishments)); filename = $"{exportbase}\\adoxio_legalentities.json"; File.WriteAllText(filename, JsonConvert.SerializeObject(o_legalentities)); filename = $"{exportbase}\\adoxio_licences.json"; File.WriteAllText(filename, JsonConvert.SerializeObject(o_licences)); filename = $"{exportbase}\\adoxio_workers.json"; File.WriteAllText(filename, JsonConvert.SerializeObject(o_workers)); filename = $"{exportbase}\\invoices.json"; File.WriteAllText(filename, JsonConvert.SerializeObject(o_invoices)); /* * // remove all BusinessContacts. * var businessContacts = _dynamicsClient.Businesscontacts.Get().Value; * * foreach (var businessContact in businessContacts) * { * try * { * _dynamicsClient.Businesscontacts.Delete(businessContact.BcgovBusinesscontactid); * Console.Out.WriteLine("Deleted BusinessContact " + businessContact.BcgovBusinesscontactid); * } * catch (OdataerrorException odee) * { * Console.Out.WriteLine("Error deleting business contact"); * Console.Out.WriteLine("Request:"); * Console.Out.WriteLine(odee.Request.Content); * Console.Out.WriteLine("Response:"); * Console.Out.WriteLine(odee.Response.Content); * } * } */ } if (isClean) { var conn = GetDynamicsConnection(Configuration); Cleaner cleaner = new Cleaner(); cleaner.Clean(conn); } if (isApplicationClean) { var conn = GetDynamicsConnection(Configuration); ApplicationCleaner cleaner = new ApplicationCleaner(); cleaner.Clean(conn); } if (isImport) { var importer = new Importer( ContactMap, AccountMap, WorkerMap, AliasMap, InvoiceMap, LicenceMap, ApplicationMap, EstablishmentMap, LegalEntityMap, LocalgovindigenousnationMap ); var conn = GetDynamicsConnection(Configuration); // read the exported data. string filename = $"{exportbase}\\accounts.json"; List <MicrosoftDynamicsCRMaccount> accounts = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMaccount> >(File.ReadAllText(filename)); filename = $"{exportbase}\\contacts.json"; List <MicrosoftDynamicsCRMcontact> contacts = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMcontact> >(File.ReadAllText(filename)); filename = $"{exportbase}\\adoxio_aliases.json"; List <MicrosoftDynamicsCRMadoxioAlias> aliases = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMadoxioAlias> >(File.ReadAllText(filename)); filename = $"{exportbase}\\adoxio_applications.json"; List <MicrosoftDynamicsCRMadoxioApplication> applications = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMadoxioApplication> >(File.ReadAllText(filename)); filename = $"{exportbase}\\adoxio_establishments.json"; List <MicrosoftDynamicsCRMadoxioEstablishment> establishments = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMadoxioEstablishment> >(File.ReadAllText(filename)); filename = $"{exportbase}\\adoxio_legalentities.json"; List <MicrosoftDynamicsCRMadoxioLegalentity> legalEntities = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMadoxioLegalentity> >(File.ReadAllText(filename)); filename = $"{exportbase}\\adoxio_licences.json"; List <MicrosoftDynamicsCRMadoxioLicences> licences = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMadoxioLicences> >(File.ReadAllText(filename)); filename = $"{exportbase}\\adoxio_workers.json"; List <MicrosoftDynamicsCRMadoxioWorker> workers = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMadoxioWorker> >(File.ReadAllText(filename)); filename = $"{exportbase}\\invoices.json"; List <MicrosoftDynamicsCRMinvoice> invoices = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMinvoice> >(File.ReadAllText(filename)); filename = $"{exportbase}\\adoxio_localgovindigenousnations.json"; List <MicrosoftDynamicsCRMadoxioLocalgovindigenousnation> lgin = JsonConvert.DeserializeObject <List <MicrosoftDynamicsCRMadoxioLocalgovindigenousnation> >(File.ReadAllText(filename)); // the order of import is important. Console.Out.WriteLine("Importing Accounts"); importer.ImportAccounts(conn, accounts); Console.Out.WriteLine("Importing Contacts"); importer.ImportContacts(conn, contacts); Console.Out.WriteLine("Importing Workers"); importer.ImportWorkers(conn, workers); Console.Out.WriteLine("Importing Aliases"); importer.ImportAliases(conn, aliases); Console.Out.WriteLine("Importing LG IN data"); importer.ImportLocalGovIndigenousNations(conn, lgin); Console.Out.WriteLine("Importing Legal Entities"); importer.ImportLegalEntities(conn, legalEntities); Console.Out.WriteLine("Importing Establishments"); importer.ImportEstablishments(conn, establishments); Console.Out.WriteLine("Importing Invoices"); importer.ImportInvoices(conn, invoices); Console.Out.WriteLine("Importing Licences"); importer.ImportLicences(conn, licences); Console.Out.WriteLine("Importing Applications"); importer.ImportApplications(conn, applications); } if (isMove) { var conn = GetDynamicsConnection(Configuration); Mover mover = new Mover(); mover.Move(conn); } if (isDetectBadAccountData) { var conn = GetDynamicsConnection(Configuration); DetectBadAccountData detector = new DetectBadAccountData(); detector.Execute(conn); } if (isFixBadAccountData) { string bceidUrl = Configuration["BCEID_SERVICE_URL"]; string bceidSvcId = Configuration["BCEID_SERVICE_SVCID"]; string bceidUserid = Configuration["BCEID_SERVICE_USER"]; string bceidPasswd = Configuration["BCEID_SERVICE_PASSWD"]; var bCeIDBusinessQuery = new BCeIDBusinessQuery(bceidSvcId, bceidUserid, bceidPasswd, bceidUrl); var conn = GetDynamicsConnection(Configuration); FixBadAccountData fixer = new FixBadAccountData(); fixer.Execute(conn, bCeIDBusinessQuery); } }
public override void Update() { Mover.Update(); sprite.Update(); }
// Start is called before the first frame update void Start() { joystick = joystick.GetComponent <FixedJoystick>(); mover = GetComponent <Mover>(); animator = GetComponent <Animator>(); }
public Walk(GameObject player) { this.playerGameObject = player; this.moverController = playerGameObject.GetComponent <Mover>(); }
protected Routine(Mover mover) { Mover = mover; SubRoutineTimeRemaining = 0f; }
private void Awake() { _chaser = GetComponent <Chaser>(); _mover = GetComponent <Mover>(); _health = GetComponent <Health>(); }
private void Awake() { _actionScheduler = GetComponent <ActionScheduler>(); _animator = GetComponent <Animator>(); _mover = GetComponent <Mover>(); }
// Start is called before the first frame update void Start() { weaponBody = GetComponent <Rigidbody>(); mover = GetComponent <Mover>(); }
// Start is called before the first frame update void Start() { weapon = gameObject.GetComponent <EquipWeapon>(); mover = gameObject.GetComponent <Mover>(); }
public override bool CanEnter(Mover mover) => mover is Flyer || mover is FireBall || mover is Walker;
public override void Update() { Mover.Update(); sprite.Update(); CheckItemIsExpired(); }
// PartyMemberAI public void UpdateNew() { if (this.m_mover != null && this.m_mover.AIController == null) { this.m_mover.AIController = this; } if (this.m_instructionTimer > 0f) { PartyMemberAI mInstructionTimer = this; mInstructionTimer.m_instructionTimer = mInstructionTimer.m_instructionTimer - Time.deltaTime; } if (this.m_instructions != null) { for (int i = 0; i < this.m_instructions.Count; i++) { this.m_instructions[i].Update(); } } if (GameState.s_playerCharacter != null && base.gameObject == GameState.s_playerCharacter.gameObject && PartyMemberAI.DebugParty) { UIDebug.Instance.SetText("Party Debug", PartyMemberAI.GetPartyDebugOutput(), Color.cyan); UIDebug.Instance.SetTextPosition("Party Debug", 0.95f, 0.95f, UIWidget.Pivot.TopRight); } if (this.m_destinationCircleState != null) { if (!base.StateManager.IsStateInStack(this.m_destinationCircleState)) { this.m_destinationCircleState = null; this.HideDestination(); } else { this.ShowDestination(this.m_destinationCirclePosition); } } if (!(GameState.s_playerCharacter != null) || !GameState.s_playerCharacter.RotatingFormation || !this.Selected) { this.HideDestinationTarget(); } else { this.ShowDestinationTarget(this.m_desiredFormationPosition); } if (this.m_revealer == null) { this.CreateFogRevealer(); } else { this.m_revealer.WorldPos = base.gameObject.transform.position; this.m_revealer.RequiresRefresh = false; } if (GameState.Paused) { base.CheckForNullEngagements(); if (this.m_ai != null) { this.m_ai.Update(); } return; } if (this.m_ai == null) { return; } if (GameState.Option.AutoPause.IsEventSet(AutoPauseOptions.PauseEvent.EnemySpotted)) { this.UpdateEnemySpotted(); } if (this.QueuedAbility != null && this.QueuedAbility.Ready) { AIState currentState = this.m_ai.CurrentState; Consumable component = this.QueuedAbility.GetComponent <Consumable>(); if (!(component != null) || !component.IsFoodDrugOrPotion) { Attack attack = currentState as Attack; TargetedAttack targetedAttack = currentState as TargetedAttack; if (this.QueuedAbility.Passive || attack == null && targetedAttack == null) { this.QueuedAbility.Activate(currentState.Owner); } else if (targetedAttack == null || !this.QueuedAbility.UsePrimaryAttack && !this.QueuedAbility.UseFullAttack) { Ability queuedAbility = AIStateManager.StatePool.Allocate <Ability>(); queuedAbility.QueuedAbility = this.QueuedAbility; if (attack == null) { base.StateManager.PushState(queuedAbility); } else if (!attack.CanCancel) { base.StateManager.QueueStateAtTop(queuedAbility); } else { attack.OnCancel(); base.StateManager.PopCurrentState(); base.StateManager.PushState(queuedAbility); } } } else { ConsumePotion queuedState = this.m_ai.QueuedState as ConsumePotion; if (!(currentState is ConsumePotion) && (queuedState == null || currentState.Priority < 1)) { ConsumePotion animationVariation = AIStateManager.StatePool.Allocate <ConsumePotion>(); base.StateManager.PushState(animationVariation); animationVariation.Ability = this.QueuedAbility; animationVariation.ConsumeAnimation = component.AnimationVariation; AttackBase primaryAttack = this.GetPrimaryAttack(); if (!(primaryAttack is AttackMelee) || !(primaryAttack as AttackMelee).Unarmed) { animationVariation.HiddenObjects = primaryAttack.GetComponentsInChildren <Renderer>(); } } } this.QueuedAbility = null; } BaseUpdate(); if (GameState.IsLoading || GameState.s_playerCharacter == null) { return; } if (this.m_alphaControl != null && this.m_alphaControl.Alpha < 1.401298E-45f) { this.m_alphaControl.Alpha = 1f; } if (this.m_mover != null && !GameState.InCombat) { bool fastSneakActive = false; if (IEModOptions.FastSneak != IEModOptions.FastSneakOptions.Normal && !(mod_Player.WalkMode)) { bool canSeeEnemy = false; if (IEModOptions.FastSneak == IEModOptions.FastSneakOptions.FastScoutingSingleLOS) { canSeeEnemy = this.m_enemySpotted; } else if (IEModOptions.FastSneak == IEModOptions.FastSneakOptions.FastScoutingAllLOS) { // if the fastSneak mod is active, then check if any enemies are spotted // if so...we walk for (int i = 0; i < PartyMemberAI.PartyMembers.Length; ++i) { var p = PartyMemberAI.PartyMembers[i]; if (p != null && p.m_enemySpotted) { canSeeEnemy = true; break; } } } else { //Should never get here, but make default behavior to not override stealth canSeeEnemy = true; } if (!canSeeEnemy) { fastSneakActive = true; } } bool flag = ((Stealth.IsInStealthMode(base.gameObject) && !fastSneakActive) || mod_Player.WalkMode); float desiredSpeed = (!flag ? this.m_mover.GetRunSpeed() : this.m_mover.GetWalkSpeed()); GameObject[] selectedPartyMembers = PartyMemberAI.SelectedPartyMembers; for (int i = 0; i < (int)selectedPartyMembers.Length; i++) { GameObject gameObject = selectedPartyMembers[i]; if (!(gameObject == null) && !(gameObject == base.gameObject) && flag == Stealth.IsInStealthMode(gameObject)) { Mover mover = gameObject.GetComponent <Mover>(); if (((!Stealth.IsInStealthMode(gameObject) || fastSneakActive) ? mover.GetRunSpeed() : mover.GetWalkSpeed()) < desiredSpeed) { desiredSpeed = mover.DesiredSpeed; } } } if (desiredSpeed < 1.5f) { desiredSpeed = 2f; } this.m_mover.UseCustomSpeed(desiredSpeed); } }
// Use this for initialization void Start() { move = GetComponent <Mover>(); }
// Use this for initialization protected void Awake() { currentHealth = maxHealth; mover = GetComponent <Mover>(); }
void Awake() { rotator = GetComponent <Rotator>(); mover = GetComponent <Mover>(); }
public LookAroundSightRoutine(Mover mover) : base(mover) { }
private void Awake() { health = GetComponent <Health>(); mover = GetComponent <Mover>(); }
// Start is called before the first frame update void Start() { boidSpawner = GameObject.FindObjectOfType <BoidSpawner>(); mover = GetComponent <Mover>(); }
// Start is called before the first frame update void Start() { player = FindObjectOfType <Player>(); mover = player.GetComponentInChildren <Mover>(); animator = player.GetComponentInChildren <Animator>(); }
private void Awake() { IsActive = false; mover = GameObject.FindGameObjectWithTag("Player").GetComponent <Mover>(); }
public override void onAddedToEntity() { _sprite = this.getComponent <Sprite>(); _mover = new Mover(); entity.addComponent(_mover); }
private void Awake() { mMover = GetComponent <Mover>(); }