Esempio n. 1
0
 private void GrabbyGrabTime(PlayerController player, float oof)
 {
     cooldown += oof;
     if (cooldown >= 120)
     {
         AIActor     actor;
         RoomHandler absoluteRoom = base.transform.position.GetAbsoluteRoom();
         actor = Owner.CurrentRoom.GetRandomActiveEnemy(true);
         GameObject hand = UnityEngine.Object.Instantiate <GameObject>(CelsItems.hellDrag.HellDragVFX);
         AkSoundEngine.PostEvent("Play_BOSS_lichB_grab_01", gameObject);
         if (!actor.healthHaver.IsBoss)
         {
             actor.healthHaver.ApplyDamage(10000000, Vector2.zero, "GetFuckedNerd", CoreDamageTypes.Void, DamageCategory.Unstoppable, true, null, true);
             actor.sprite.renderer.enabled = false;
             actor.shadowDeathType         = AIActor.ShadowDeathType.None;
             tk2dBaseSprite corpsesprite = actor.CorpseObject.GetComponent <tk2dBaseSprite>();
             corpsesprite.sprite.renderer.enabled = false;
         }
         else
         {
             if (actor.healthHaver.IsBoss)
             {
                 actor.healthHaver.ApplyDamage(80, Vector2.zero, "GetFuckedNerdButSlightlyLessThanNormalNerds", CoreDamageTypes.Void, DamageCategory.Unstoppable, true, null, true);
             }
         }
         tk2dBaseSprite component1 = hand.GetComponent <tk2dBaseSprite>();
         component1.usesOverrideMaterial = true;
         component1.PlaceAtLocalPositionByAnchor(actor.specRigidbody.UnitCenter, tk2dBaseSprite.Anchor.LowerCenter);
         component1.renderer.material.shader = ShaderCache.Acquire("Brave/Effects/StencilMasked");
         cooldown -= 120;
     }
 }