コード例 #1
0
        public void Deprovision(ClientContext ctx, Web web, AppManifestBase manifest)
        {
            Ctx       = ctx;
            Web       = web;
            IsHostWeb = !WebHasAppinstanceId(Web);

            var customActionManager = new CustomActionManager(ctx)
            {
                CustomActions = manifest.CustomActionCreators
            };

            customActionManager.DeleteAll();

            var fileManager = new FileManager
            {
                Folders  = manifest.Folders,
                Creators = manifest.FileCreators
            };

            fileManager.DeleteAll(ctx, web);

            var listManager = new ListInstanceManager(ctx, IsHostWeb)
            {
                Creators = manifest.ListCreators
            };

            listManager.DeleteAll();

            var contentTypeManager = new ContentTypeManager
            {
                Creators = manifest.ContentTypeCreators
            };

            contentTypeManager.DeleteAll(ctx);

            var fieldManager = new FieldManager
            {
                FieldDefinitions = manifest.Fields
            };

            fieldManager.DeleteAll(ctx);

            var remoteEventRegistrationManager = new RemoteEventRegistrationManager();

            remoteEventRegistrationManager.DeleteAll(ctx, web, manifest.RemoteEventRegistrationCreators);
        }
コード例 #2
0
    void OnCollisionEnter2D(Collision2D collision)
    {
        if (collision.transform.tag.Equals("Ball"))
        {
            if (hp > 0)
            {
                --hp;
            }

            hpImage.fillAmount = hp / maxHp;

            if (hp <= 0 && !gameManager.GetEnd())
            {
                GetComponent <AudioSource>().PlayOneShot(GetComponent <AudioSource>().clip);
                fieldManager.DeleteAll();
                effectManager.transform.parent = null;
                effectManager.SetEffect();
                text.enabled = true;
                gameManager.SetEnd();
                Destroy(gameObject);
            }
        }
    }