コード例 #1
0
ファイル: AutoPlayFx.cs プロジェクト: frozen4/UnityPlus
    void Awake()
    {
        _FxProxy = gameObject.GetComponent <CFxProxy>();
        if (_FxProxy == null)
        {
            _FxProxy = gameObject.AddComponent <CFxProxy>();
        }

        if (_FxProxy != null)
        {
            _FxProxy.Init();
        }
    }
コード例 #2
0
ファイル: CFxOne.cs プロジェクト: frozen4/UnityPlus
    public void SetFxGameObject(GameObject fx)
    {
        _RealFxGameObject = fx;

        if (_RealFxGameObject != null)
        {
            _FxProxy = _RealFxGameObject.GetComponent <CFxProxy>();
            if (_FxProxy == null)
            {
                _FxProxy = _RealFxGameObject.AddComponent <CFxProxy>();
                _FxProxy.Init();
            }
        }
        else
        {
            _FxProxy = null;
        }
    }