Ejemplo n.º 1
0
        public static void SetMinatoButtons()
        {
            TeleportSfx = Assets.LoadAsset("sfx_teleport").Cast <AudioClip>();
            SealSfx     = Assets.LoadAsset("sfx_seal").Cast <AudioClip>();

            SealButton = new CooldownButton(
                onClick: () => SetMinatoTarget(PlayerControl.LocalPlayer.FindClosestTarget()),
                cooldown: SealCooldown,
                firstCooldown: 10,
                needsTarget: true,
                sprite: Assets.LoadAsset("SealButton").Cast <GameObject>().GetComponent <SpriteRenderer>().sprite,
                positionOffset: ButtonsPosition,
                useTester: () => !PlayerControl.LocalPlayer.Data.IsDead && PlayerControl.LocalPlayer.IsMinato() && Utils.MinatoTarget == null,
                hudManager: HudManager.Instance
                );
        }
Ejemplo n.º 2
0
        public static void SetMinatoTarget(PlayerControl target)
        {
            if (target != null)
            {
                SoundManager.Instance.PlaySound(SealSfx, false, .9f);
            }

            Utils.MinatoTarget = target;
            CustomRpc.HandleCustomRpc(target?.PlayerId, CustomRpc.CustomRpcType.SetMinatoTarget);

            if (TeleportButton == null)
            {
                TeleportButton = new CooldownButton(
                    onClick: () => TeleportToTarget(Utils.MinatoTarget),
                    cooldown: TeleportCooldown,
                    firstCooldown: TeleportCooldown,
                    needsTarget: false,
                    sprite: Assets.LoadAsset("TeleportButton").Cast <GameObject>().GetComponent <SpriteRenderer>().sprite,
                    positionOffset: ButtonsPosition,
                    useTester: () => !PlayerControl.LocalPlayer.Data.IsDead && PlayerControl.LocalPlayer.IsMinato() && Utils.MinatoTarget != null,
                    hudManager: HudManager.Instance
                    );
            }
        }
Ejemplo n.º 3
0
 public static void Postfix(HudManager __instance)
 {
     CooldownButton.HudUpdate();
 }