void Start() { cs = GetComponentInParent <ControlSource>(); rb = GetComponentInParent <Rigidbody2D>(); attack = GetComponent <Attack>(); attackRange = attack.GetAttackRange(); }
protected virtual void Start() { sh = transform.root.GetComponentInChildren <StealthHider>(); cs = GetComponentInParent <ControlSource>(); move = transform.parent.GetComponentInChildren <Movement>(); SelectFiringSound(); energy = GetComponent <Energy>(); }
void Start() { cs = GetComponentInParent <ControlSource>(); if (cs) { isAvatarOfLocalPlayer = cs.CheckIfAvatarOfLocalPlayer(); } collider = GetComponent <CircleCollider2D>(); collider.radius = 0.001f; }
protected override void OnCheckedChanged(EventArgs e) { var handler = CheckedChanged; if (handler != null) { handler(this, new AwareControlEventArgs(controlSource)); } controlSource = ControlSource.Programatic; }
int ownAllegiance; //this is fine to set because combat units don't just change allegiance... protected override void Start() { base.Start(); ownAllegiance = iff.GetIFFAllegiance(); attackRange = attack.GetAttackRange(); speedSetting = 2; CreateNewOffset(1); ss = GetComponentInChildren <StealthSeeker>(); factionLeader = am.factionLeaders[ownAllegiance].gameObject; factionLeaderCS = factionLeader.GetComponent <ControlSource>(); }
// Start is called before the first frame update void Start() { srs = transform.root.GetComponentsInChildren <SpriteRenderer>(); rb = transform.root.GetComponentInChildren <Rigidbody2D>(); hiderColl = GetComponent <CircleCollider2D>(); hiderColl.radius = hiderRadius_Base; cs = transform.root.GetComponentInChildren <ControlSource>(); iff = transform.root.GetComponentInChildren <IFF>(); am = FindObjectOfType <AllegianceManager>(); FadeOrTurnInvisible(); }
// Update is called once per frame protected virtual void Update() { if (!cs) { cs = GetComponent <ControlSource>(); } if (!rb) { rb = GetComponent <Rigidbody2D>(); } if (cs.IsRunningOnServer) { CheckForCommandedMovement(); } }
public void setPlayer(int i, XKeyboard keyboard) { inGame = false; readied = false; this.keyboard = keyboard; controlSource = ControlSource.keyboard; connected = true; name = NameTextBox.Text; score = 0; canAnswer = false; lastAnswerResult = AnswerResult.no_answer; player = i; setColor(); readiedSound = new MediaPlayer(); }
public void setPlayer(int i, XInputController controller) { inGame = false; readied = false; this.controller = controller; controlSource = ControlSource.controller; connected = controller.connected; name = NameTextBox.Text; score = 0; canAnswer = false; lastAnswerResult = AnswerResult.no_answer; player = i; setColor(); readiedSound = new MediaPlayer(); }
private void SelectionChangedJaco(string Mode) { System.Diagnostics.Debug.WriteLine("Jaco arm " + Mode); ControlSource.Options = ControlSource.setOptions(Mode); ControlOptions.ItemsSource = null; ControlOptions.ItemsSource = ControlSource.Options; //foreach (ControlOption option in ControlOptions.ItemsSource) //{ // System.Diagnostics.Debug.WriteLine(option.buttonVisible[0]); // System.Diagnostics.Debug.WriteLine(option.name); // System.Diagnostics.Debug.WriteLine(option.imageName); // System.Diagnostics.Debug.WriteLine(option.buttonImages); //} ControlSource.updateUris(); }
// Start is called before the first frame update void Start() { srs = transform.root.GetComponentsInChildren <SpriteRenderer>(); rb = transform.root.GetComponentInChildren <Rigidbody2D>(); hiderColl = GetComponent <CircleCollider2D>(); hiderColl.radius = hiderRadius_Base; cs = transform.root.GetComponentInChildren <ControlSource>(); //iff = transform.root.GetComponentInChildren<IFF>(); //am = FindObjectOfType<AllegianceManager>(); if (!isBuilding) { isAvatarOfLocalPlayer = cs.CheckIfAvatarOfLocalPlayer(); } if (!isAvatarOfLocalPlayer) { FadeOrTurnInvisible(); } }
public override int GetHashCode() { unchecked { var hashCode = PropMask?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (Name?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Tag?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ Id; hashCode = (hashCode * 397) ^ HelpContextId; hashCode = (hashCode * 397) ^ (int)BitFlags; hashCode = (hashCode * 397) ^ (int)ObjectStreamSize; hashCode = (hashCode * 397) ^ TabIndex.GetHashCode(); hashCode = (hashCode * 397) ^ ClsidCacheIndex.GetHashCode(); hashCode = (hashCode * 397) ^ GroupId.GetHashCode(); hashCode = (hashCode * 397) ^ (ControlTipText?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (RuntimeLicKey?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (ControlSource?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (RowSource?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (SitePosition?.GetHashCode() ?? 0); return(hashCode); } }
public AwareControlEventArgs(ControlSource s) { Source = s; }
void AwareCheckbox_MouseDown(object sender, MouseEventArgs e) { controlSource = ControlSource.ByMouse; }
void AwareCheckbox_KeyDown(object sender, KeyEventArgs e) { controlSource = ControlSource.ByKeyboard; }
protected virtual void Start() { cs = GetComponentInParent <ControlSource>(); attack = transform.parent.GetComponentInChildren <Attack>(); rb = GetComponentInParent <Rigidbody2D>(); }
void Start() { cs = GetComponent <ControlSource>(); }
protected virtual void Start() { cs = GetComponent <ControlSource>(); rb = GetComponent <Rigidbody2D>(); }
protected virtual void Start() { cs = GetComponentInParent <ControlSource>(); }