MovementDirection.hasPositionChange C# (CSharp) Method

hasPositionChange() public method

public hasPositionChange ( ) : bool
return bool
    public bool hasPositionChange()
    {
        return positionChanged;
    }

Usage Example

Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        Quaternion rot = Quaternion.identity;

        if (direction.lastDirection == MovementDirection.Direction.RIGHT)
        {
            rot = Quaternion.AngleAxis(180.0f, Vector3.up);
        }

        blood.transform.rotation = rot;

        bool particlesEnabled = player.onGround && direction.hasPositionChange();

        GameObjectHelper.visitComponentsInDirectChildren <ParticleEmitter>(blood, (e) => {
            e.emit = particlesEnabled;
        });
    }