Beispiel #1
0
    public void BlinkMov()
    {
        Vector3 movX = Vector3.right * 2;
        Vector3 movY = Vector3.up * 2;

        if (hotkeys.IsUpPress())
        {
            imgInst.transform.position = playerBlinking.GetPosition() + movY;
        }
        else if (hotkeys.IsDownPress())
        {
            imgInst.transform.position = playerBlinking.GetPosition() - movY;
        }
        else if (hotkeys.IsRightPress())
        {
            imgInst.transform.position = playerBlinking.GetPosition() + movX;
        }
        else if (hotkeys.IsLeftPress())
        {
            imgInst.transform.position = playerBlinking.GetPosition() - movX;
        }
        blinkDurationTimer -= Time.deltaTime;
    }