Ejemplo n.º 1
0
    public void LoadAssetEffectProgressBuild()
    {
        if (containerEffectsBuild == null)
        {
            return;
        }

        if (assetEffectProgressBuildCode != BaseDataObjectKeys.none &&
            lastAssetEffectProgressBuildCode != assetEffectProgressBuildCode)
        {
            lastAssetEffectProgressBuildCode = assetEffectProgressBuildCode;

            GameObject go = AppContentAssets.LoadAssetEffects(assetEffectProgressBuildCode);

            if (go != null)
            {
                containerEffectsBuild.DestroyChildren();
                go.transform.parent = containerEffectsBuild.transform;
                go.TrackObject(containerEffectsBuild);
            }
        }
    }
Ejemplo n.º 2
0
    private void Dead()
    {
        if (!string.IsNullOrEmpty(effectDestroy))
        {
            AppContentAssets.LoadAssetEffects(
                effectDestroy, transform.position, transform.rotation);
        }

        if (gamePlayerController != null)
        {
            gamePlayerController.Die();
        }
        else if (gameZoneActionAsset != null)
        {
            gameZoneActionAsset.AssetAnimationPlayNormalized(0f);
        }
        else
        {
            if (enableObjectRemove)
            {
                GameObjectHelper.DestroyGameObject(this.gameObject, true);
            }
        }
    }