コード例 #1
0
    public void EndPosion(OnStatusEndEventData e)
    {
        StatusCollection Collection =
            e.Target.GetComponentInChildren <StatusCollection>();

        if (Collection != null)
        {
            Collection.RemoveStatus(Status);
        }
        ColorShifter shifter =
            e.Target.GetComponentInChildren <ColorShifter>();

        if (shifter != null)
        {
            shifter.ShiftToColor(
                new Color(0f, 1f, 0f, 1f),
                new Color(1f, 1f, 1f, 1f),
                1f
                );
            StartCoroutine(DestroyAfter(1f));
        }
        else
        {
            Destroy(gameObject);
        }
    }
コード例 #2
0
    public void EndConfusion(OnStatusEndEventData e)
    {
        MovableBody movableBody =
            e.Target.GetComponentInChildren <MovableBody>();

        if (movableBody != null)
        {
            RemoveLastRandomMovement(movableBody);
        }
        StatusCollection Collection =
            e.Target.GetComponentInChildren <StatusCollection>();

        if (Collection != null)
        {
            Collection.RemoveStatus(Status);
        }
        ColorShifter shifter =
            e.Target.GetComponentInChildren <ColorShifter>();

        if (shifter != null)
        {
            shifter.ShiftToColor(
                new Color(1f, 1f, 0f, 1f),
                new Color(1f, 1f, 1f, 1f),
                1f
                );
            StartCoroutine(DestroyAfter(1f));
        }
        else
        {
            Destroy(gameObject);
        }
    }