void Awake() { m_movement = Avatar.GetComponent<Movement>(); m_light_attack = Avatar.GetComponent<LightAttack>(); m_lock_on = Avatar.GetComponent<LockOn>(); m_dodge = Avatar.GetComponent<Dodge>(); }
void Initialize() { if (detector == null) { this.enabled = false; return; } _ovrSkelton = detector.GetComponent <OVRSkeleton>(); lockOn = FindObjectOfType <LockOn>(); if (_ovrSkelton == null) { return; } IndexTip = _ovrSkelton.Bones[(int)OVRSkeleton.BoneId.Hand_IndexTip].Transform; Index3 = _ovrSkelton.Bones[(int)OVRSkeleton.BoneId.Hand_Index3].Transform; StartCoroutine(ShotLoop()); Addressables.InstantiateAsync(GunCircle).Completed += op => { op.Result.transform.parent = transform; op.Result.transform.position = IndexTip.position; Circle = op.Result; }; }
void Start() { l = FindObjectOfType <LockOn>(); foreach (EnemyMovement e in EnemyList) { e.Manager = transform.gameObject; } }
void Initialize() { if (detector == null) { this.enabled = false; return; } lockOn = FindObjectOfType <LockOn>(); StartCoroutine(ShotLoop()); }
IEnumerator LockOn() { float xOffset = Random.Range(-0.2f, 0.2f); float yOffset = Random.Range(-0.2f, 0.2f); GameObject lockOnClone = Instantiate(lockOn, new Vector2(playerTarget.transform.position.x + xOffset, playerTarget.transform.position.y + yOffset), Quaternion.identity); LockOn lockon = lockOnClone.GetComponent <LockOn>(); lockon.setOffset(xOffset, yOffset); yield return(new WaitForSeconds(0.4f)); hasLocked = true; }
// Grip buttons are used to lock onto an enemy, we use a sphere cast // to look for an enemy in front of the controller private void HandleGripClicked(object sender, ClickedEventArgs e) { ani.point(); LockOn enemyLock = GetComponent <LockOn>(); // we need to hold a reference to the enemy Enemy enemy; // do the sphere cast to get a lock on enemy = enemyLock.GetLock(_controller); // if there is an enemy if (enemy) { // let the player know were locked on, // and give them a reference to the enemy player.LockOntoEnemy(true, enemy); } else { player.LockOntoEnemy(false, null); } }
protected override void ExecuteCombo(int id) { switch (id) { case 1: LockOn?.Invoke(); break; case 0: LockOff?.Invoke(); break; case 2: Interact?.Invoke(); break; case 3: Pause?.Invoke(); break; case 4: Jump?.Invoke(); break; case 5: Dodge?.Invoke(); break; case 11: Attack?.Invoke(); break; case 10: AttackSeq?.Invoke(); break; } }
void Awake() { mAnimator = GetComponent<Animator>(); mRigidbody = GetComponent<Rigidbody2D>(); mLockOn = GetComponent<LockOn>(); }
void Start() { lockOn = FindObjectOfType <LockOn>(); StartCoroutine(ShotLoop()); }
void Awake() { m_movement = GetComponent<Movement>(); m_lock_on = GetComponent<LockOn>(); m_animator = GetComponent<Animator>(); }
void Awake() { m_subject_motion = Subject.GetComponent<MobMotion>(); m_subject_lock_on = Subject.GetComponent<LockOn>(); }
void Awake() { mMobMotion = Avatar.GetComponent<MobMotion>(); mLockOn = Avatar.GetComponent<LockOn>(); mAnimator = Avatar.GetComponent<Animator>(); }
void Awake() { m_lock_on = Avatar.GetComponent<LockOn>(); m_sprite_renderer = GetComponent<SpriteRenderer>(); }
// Start is called before the first frame update void Start() { lockOn = GetComponent <LockOn>(); freeRotation = GetComponent <FreeRotation>(); }