private void Start()
 {
     SendWeapon.Raise    += GetWeaponHandler;
     button               = GetComponent <Image>();
     EndGame.RaiseNoArgs += EndGameHandler;
     wffObj               = ScriptableObject.CreateInstance <WaitForFixedUpdateObj>();
     wfsObj               = ScriptableObject.CreateInstance <WaitForSecondsObj>();
 }
예제 #2
0
    private void OnEnable()
    {
        line = beam.GetComponent <LineRenderer>();
        Invoke(nameof(Disable), holdTime);
        enableEvent.Invoke();

        wfsObj = ScriptableObject.CreateInstance <WaitForFixedUpdateObj>();

        if (directionBool.value)
        {
            //transform.rotation = Quaternion.Euler(0,0,0);
        }
        else
        {
            // transform.rotation = Quaternion.Euler(0,180,0);
        }
        StartCoroutine(ShootBeamInDir());
        enableEvent.Invoke();
    }