// Use this for initialization void Start() { headController = FindObjectOfType <HeadController>(); tutorialText.color = new Color(1, 1, 1, 0); tutorialText.text = moveText; StartCoroutine(FadeInAndOut()); }
public RectangleAABB InitializeShapedotsHelper(bool isNew = false) { autodotsShapeHelper.headMeshesController = headMeshesController; autodotsShapeHelper.SetType((int)ProgramCore.Project.ManType); autodotsShapeHelper.Initialise(HeadController.GetDots(ProgramCore.Project.ManType), isNew); if (!isNew) { autodotsShapeHelper.TransformRects(); } var result = new RectangleAABB(); if (isNew && ProgramCore.Project.ManType != ManType.Custom) { Vector3 min = result.A, max = result.B; for (var i = 8; i < autodotsShapeHelper.ShapeInfo.Points.Count; ++i) { var p = autodotsShapeHelper.ShapeInfo.Points[i]; min.X = Math.Min(p.Value.X, min.X); min.Y = Math.Min(p.Value.Y, min.Y); max.X = Math.Max(p.Value.X, max.X); max.Y = Math.Max(p.Value.Y, max.Y); } result.A = min; result.B = max; } return(result); }
public override void Initialise() { myType = behaviourType.guardEntrance; hc = this.gameObject.GetComponentInChildren <HeadController> (); rid = this.gameObject.GetComponent <Rigidbody2D> (); myController = this.GetComponent <NPCController> (); locationNode = PoliceController.me.getPointToGuard(); if (locationNode == null) { noGuardFallback(); rotationToFace = Quaternion.Euler(0, 0, Random.Range(0, 360)); locationToGuard = locationNode.transform.position; } else { setNearest(); rotationToFace = Quaternion.Euler(0, 0, Vector3.Angle(locationToGuard, nearestDoor.transform.position)); locationToGuard = locationNode.transform.position; } distance = Random.Range(1.0f, 5.0f); //rotationToFace = Quaternion.Euler (0, 0, Random.Range(0,360)); myController.pf.getPath(this.gameObject, locationNode.gameObject); isInitialised = true; }
void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.tag == "head") { HeadController headObj = other.gameObject.GetComponent <HeadController> (); Instantiate(explosion).GetComponent <Transform> ().position = other.gameObject.GetComponent <Transform> ().position; Damage(damage); headObj.Reset(); headColl = other.gameObject.GetComponent <AudioSource> (); headColl.Play(); } if (other.gameObject.tag == "coin") { CoinController coinObj = other.gameObject.GetComponent <CoinController> (); coinObj.Reset(); Player.Instance.Money = Player.Instance.Money + 10; coinColl = other.gameObject.GetComponent <AudioSource> (); coinColl.Play(); } }
void Awake() { rb2d = GetComponent <Rigidbody2D> (); col2d = GetComponent <CircleCollider2D> (); myInput = GetComponent <TestInput> (); head = GetComponentInChildren <HeadController>(); }
private void Start() { headController = GetComponentInChildren <HeadController>(); capsuleCollider = GetComponent <CapsuleCollider>(); CalculateCollider(); }
void Awake() { _instance = this; head = gameObject; menuSpawn = GameObject.FindGameObjectsWithTag(Constants.spInteriorMenuSpawn) [0] as GameObject; oldRotationgAngleY = head.transform.eulerAngles.y; }
public void Title_WhenCalledWithEntryContentBaseWithSeoTitle_ShouldReturnFormatTitleOfNodeAndEntry() { var seoInformation = new SeoInformation() { Title = "Entry Seo Tittle" }; _entryContentMock.Setup(c => c.SeoInformation).Returns(seoInformation); var nodeSeoInformation = new SeoInformation() { Title = "Node Seo Tittle" }; _nodeContentMock.Setup(c => c.SeoInformation).Returns(nodeSeoInformation); var contentLoaderMock = SetupContentLoader(); contentLoaderMock.Setup(c => c.Get <CatalogContentBase>(It.IsAny <ContentReference>())).Returns(_nodeContentMock.Object); _contentRouteHelperMock.Setup(c => c.Content).Returns(() => _entryContentMock.Object); var subject = new HeadController(contentLoaderMock.Object, _contentRouteHelperMock.Object); var result = subject.Title(); Assert.Equal <string>("Entry Seo Tittle - Node Seo Tittle-Quicksilver", ((ContentResult)result).Content); }
public VisionForm(MainForm mainForm) : this() { this.parent = mainForm; this.controller = mainForm.controller; this.controller.HeadMove += controller_HeadMove; }
public VisionForm(QuestionForm mainForm) : this() { this.parent = mainForm; this.controller = mainForm.controller; this.controller.HeadMove += controller_HeadMove; this.controller.NewFrame += controller_NewFrame; }
public void Title_WhenCalledWithNoContentFromContentRouteHelper_ShouldReturnEmpty() { _contentRouteHelperMock.Setup(c => c.Content).Returns(() => null); var subject = new HeadController(null, _contentRouteHelperMock.Object); var result = subject.Title(); Assert.Equal <string>(string.Empty, ((ContentResult)result).Content); }
void Start() { _renderer = GetComponent <SpriteRenderer>(); _headController = GetComponentInParent <HeadController>(); _mover = GetComponentInParent <TestMove>(); _mover.RegisterOnStateChange(OnStateChange); SetTargetSprite(); }
public AMGForm(HeadController controller) { InitializeComponent(); this.Controller = controller; BrushTypeComboBox.SelectedIndex = 0; TileTypeComboBox.SelectedIndex = 0; BrushSizeComboBox.SelectedIndex = 0; teamComboBox.SelectedIndex = 0; onHillComboBox.SelectedIndex = 0; }
public void Title_WhenCalledWithStartPageWithTitle_ShouldReturnTitle() { _startPageMock.Setup(c => c.Title).Returns("Title"); _contentRouteHelperMock.Setup(c => c.Content).Returns(() => _startPageMock.Object); var subject = new HeadController(null, _contentRouteHelperMock.Object); var result = subject.Title(); Assert.Equal <string>("Title", ((ContentResult)result).Content); }
public void Restart() { m_LeftHeadContr = (HeadController)m_LeftHead.GetComponent(typeof(HeadController)); m_RightHeadContr = (HeadController)m_RightHead.GetComponent(typeof(HeadController)); m_MassEaten = 0.0f; m_State = MonsterState.Normal; m_TargetPos.y = m_StartPosY; m_LeftHeadContr.Restart(); m_RightHeadContr.Restart(); }
private void Start() { if (!isLocalPlayer) { return; } GetComponentInChildren <HeadController>().enabled = true; rb = GetComponent <Rigidbody>(); anim = GetComponent <Animator>(); hc = GetComponentInChildren <HeadController>(); }
private void Start() { // Search for the endPanel and deactivate it endPanel = GameObject.FindGameObjectWithTag(Tags.endPanel); winText = endPanel.GetComponentInChildren <TextMeshProUGUI>(); nameIF = endPanel.GetComponentInChildren <TMP_InputField>(); nameIF.enabled = false; endPanel.SetActive(false); headController = GameObject.FindGameObjectWithTag(Tags.head).GetComponent <HeadController>(); }
// Update is called once per frame void FixedUpdate() { for (int i = 0; i < person_num; i++) { if (WormsList[i] != null) { HeadController headController = WormsList[i].GetComponent <HeadController>(); headController.Z_rotate_update(z_rotate_angle[i]); } } }
static void Main() { HeadController controller = new HeadController(); AMGForm gui = new AMGForm(controller); controller.AddObserver(gui); Application.EnableVisualStyles(); gui.Show(); gui.FormClosed += CheckApplicationEnd; Application.Run(); }
private void Start() { // Initialize health health = maxHealth; anim = gameObject.GetComponent <Animator>(); enemy = GetComponent <Enemy>(); objPooler = ObjectPooler.instance; headController = GameObject.FindGameObjectWithTag(Tags.head).GetComponent <HeadController>(); }
void Awake() { rid = this.GetComponent <Rigidbody2D> (); hc = this.GetComponentInChildren <HeadController> (); //this.gameObject.GetComponentInChildren<AnimationController> ().head.GetComponent<HeadController> (); pwc = this.gameObject.GetComponent <PersonWeaponController> (); if (this.gameObject.GetComponent <PathFollower> () == null) { } else { pl = this.gameObject.GetComponent <PathFollower> (); } //myLegs = this.gameObject.GetComponentInChildren<Legs> (); }
// Start is called before the first frame update protected virtual void Start() { rotator = GetComponentInChildren <Rotator>(); anim = GetComponentInChildren <Animator>(); agent = GetComponentInChildren <NavMeshAgent>(); hc = GetComponentInChildren <HeadController>(); rb = GetComponentInChildren <Rigidbody>(); GetComponentInChildren <Interactable>().InteractEvent += TurnTo; if (!hand) { hand = transform; } forward_hash = Animator.StringToHash("Forward"); }
void Awake() { ovrCameraController = GetComponentInChildren<OVRCameraController>(); ovrCameraControllerTransform = ovrCameraController.transform; headController = GetComponent<HeadController>(); handsController = GetComponent<HandsController>(); feetController = GetComponent<FeetController>(); motionController = GetComponent<MotionController>(); swooshSound = ovrCameraControllerTransform.Find("SwooshSound").GetComponent<AudioSource>(); materialTriggers = GameObject.FindObjectsOfType( typeof (TriggerSolidColor ) ) as TriggerSolidColor[]; foreach ( CameraAnchor cameraAnchor in GameObject.FindObjectsOfType( typeof(CameraAnchor) )) characterCameraAnchorTransforms.Add( cameraAnchor.transform ); }
public void Title_WhenCalledWithNodeContentWithSeoTitle_ShouldReturnFormatSeoTitle() { var seoInformation = new SeoInformation() { Title = "Seo Tittle" }; _nodeContentMock.Setup(c => c.SeoInformation).Returns(seoInformation); _contentRouteHelperMock.Setup(c => c.Content).Returns(() => _nodeContentMock.Object); var subject = new HeadController(SetupContentLoader().Object, _contentRouteHelperMock.Object); var result = subject.Title(); Assert.Equal <string>("Seo Tittle-Quicksilver", ((ContentResult)result).Content); }
public void RefreshSkin() { if (Head && Head2 && Body && Pipi) { if (HeadSprite && PipiSprite && BodyMaterial) { HeadSprite.sprite = Head; PipiSprite.sprite = Pipi; BodyMaterial.mainTexture = Body; HC = GetComponentInChildren <HeadController>(); HC.NormalHead = Head; HC.CollideHead = Head2; } } }
public void Setup(HeadController headController, int a_maxHeads, int a_index, float a_speed, float a_headDist, float a_waitTime, int maxObjs, int maxObjs2) { head = headController; maxHeads = a_maxHeads; index = a_index; speed = a_speed; headDistancing = a_headDist; waitTime = a_waitTime; maxmarshCount = maxObjs; maxWaterCount = maxObjs2; transform.localPosition = new Vector3(index * headDistancing, -5, 0); mouthController.ResetObj(); StartCoroutine(MoveHeads()); }
public void Title_WhenCalledWithNodeContentWithoutSeoTitle_ShouldReturnFormatName() { var seoInformation = new SeoInformation() { Description = "Without seo title" }; _nodeContentMock.Setup(c => c.SeoInformation).Returns(seoInformation); _nodeContentMock.Setup(c => c.DisplayName).Returns("Display Name"); _contentRouteHelperMock.Setup(c => c.Content).Returns(() => _nodeContentMock.Object); var subject = new HeadController(SetupContentLoader().Object, _contentRouteHelperMock.Object); var result = subject.Title(); Assert.Equal("Display Name-Quicksilver", ((ContentResult)result).Content); }
// Use this for initialization void Start() { wrapPoints = new List <WrapPoint>(GetComponentsInChildren <WrapPoint>()); originalMaterials = new List <Material>(GetComponent <Renderer>().materials); List <Material> blehMaterials = new List <Material>(); for (int i = 0; i < originalMaterials.Count; i++) { blehMaterials.Add(blehMaterial); } GetComponent <Renderer>().materials = blehMaterials.ToArray(); //Assigning dopey head dopeyHead = GameObject.Find("HeadSegment").GetComponent <HeadController>(); //Assigning mood controller mood = GameObject.Find("AngryTrigger").GetComponent <MoodController>(); }
private void initializeChildren() { for (int i = 0; i < transform.childCount; i++) { if (transform.GetChild(i).gameObject.CompareTag("PlayerHead")) { head = transform.GetChild(i).gameObject.GetComponent <HeadController>(); } else if (transform.GetChild(i).gameObject.CompareTag("PlayerBody")) { bodies = gameObject.transform.GetChild(i); } else if (transform.GetChild(i).gameObject.CompareTag("PlayerTail")) { tail = gameObject.transform.GetChild(i).gameObject.GetComponent <BodyController>(); } } }
public bool IsTileWithSecondHea(HeadController head, TileLogic tile) { if (head == head1) { if (head2.coordinates == tile) { return(true); } } else { if (head1.coordinates == tile) { return(true); } } return(false); }
public void ErasePathFromAnotherHead(HeadController head) { if (isFinished) { head1.ErasePath(); head2.ErasePath(); } else { if (head == head1) { head2.ErasePath(); } else { head1.ErasePath(); } } isFinished = false; }
// Use this for initialization void Start() { headController = target.GetComponent<HeadController> (); }