예제 #1
0
 protected override void Awake()
 {
     base.Awake();
     state                    = E_PenetrateState.Idle;
     searchRangeSqr           = searchRange * searchRange;
     penetrateMaintainTimeWFS = new WaitForSeconds(penetrateMaintainTime);
 }
예제 #2
0
 public void Settle(Vector3 position)
 {
     effect.StopTrail();
     state = E_PenetrateState.Settle;
     transform.position = position;
     StartCoroutine(PenetrateVision());//투시 효과
     StartCoroutine(PenetrateWaveEffect());
 }
예제 #3
0
 public void DeActivate()
 {
     effect.StopEffect();
     state = E_PenetrateState.Idle;
     transform.position = Vector3.zero;
     StopAllCoroutines();
     gameObject.SetActive(false);
 }
예제 #4
0
        public void Activate(Vector3 origin, Vector3 direction)
        {
            gameObject.SetActive(true);
            state = E_PenetrateState.Shot;
            transform.position = origin;
            transform.LookAt(origin + direction * 1f);

            effect.StopEffect();
            effect.MakeParticleTrail(transform, 0.1f, new Vector2(1f, 1f), 1.5f, 0.2f, 20);
        }