void Update()
 {
     if (!mouseInput.SelectionButtonUp())
     {
         return;
     }
     onPress?.Invoke(mouseInput.MousePosition());
 }
예제 #2
0
 public void InvokeMove(Vector2 v)
 {
     move.Invoke(v);
     if (CheckMove(v))
     {
         moveUpdate.Invoke(v);
         print("move update");
     }
     lastMove = v;
 }
예제 #3
0
    //Calculate target point for bullet
    public void ResolveFire(Vector2 position)
    {
        RaycastHit hit;
        Ray        ray = Camera.main.ScreenPointToRay(position);

        if (Physics.Raycast(ray, out hit))
        {
            OnFire.Invoke(hit.point);
        }
    }
예제 #4
0
        void Update()
        {
            var o = curve.Evaluate(reaktor.Output);

            if (optionType == OptionType.Bool)
            {
                boolTarget.Invoke(0.5f <= o);
            }
            else if (optionType == OptionType.Int)
            {
                intTarget.Invoke((int)o);
            }
            else if (optionType == OptionType.Vector)
            {
                vectorTarget.Invoke(origin + direction * o);
            }
            else
            {
                floatTarget.Invoke(o);
            }
        }