Skip to content

Instantly share code, notes, and snippets.

View Ciberusps's full-sized avatar

[Dev] Pavel Penkov Ciberusps

View GitHub Profile
using System;
using System.Collections.Generic;
using UnityEngine;
public static class ExtensionMethods
{
public static int Round(this float value)
{
var decimalpoints = Math.Abs(value - Math.Floor(value));
return decimalpoints < 0.5
@Ciberusps
Ciberusps / UsefulLinks.md
Last active June 24, 2017 14:00
Unity полезные ссылки.
@Ciberusps
Ciberusps / visually-hidden
Created February 19, 2019 13:41
CSS tricks
.vissually-hidden {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
border: 0;
padding: 0;
clip: rect(0 0 0 0);
overflow: hidden;
}
@Ciberusps
Ciberusps / gist:4d60233f75f19810a824cbd1874bb20d
Last active August 31, 2022 09:58
New IDOTA2DPC endpoints(examples)
// IDOTA2DPC (without any token needed)
https://www.dota2.com/webapi/IDOTA2DPC/GetRealtimeMatchStats/v001?server_steam_id=90124322071664650 // calls in realtime match every 15 seconds
https://www.dota2.com/webapi/IDOTA2DPC/GetPlayerInfo/v001?account_id=234699894
https://www.dota2.com/webapi/IDOTA2DPC/GetLeagueMatchMinimal/v001?league_id=10681&match_id=4535629696
https://www.dota2.com/webapi/IDOTA2DPC/GetSingleTeamInfo/v001?team_id=36&get_dpc_info=1
https://www.dota2.com/webapi/IDOTA2DPC/GetLeagueNodeData/v001?league_id=10681&node_id=186
https://www.dota2.com/webapi/IDOTA2DPC/GetLeagueInfoList/v001?start_timestamp=1535760000&min_tier=3
https://www.dota2.com/webapi/IDOTA2DPC/GetRecentAndUpcomingMatches/v001
// User specific feed, favourites (methods names at the end)
@Ciberusps
Ciberusps / JumpController.cs
Created August 2, 2021 09:58 — forked from Priler/CubeController.cs
JumpController.cs
using UnityEngine;
using DG.Tweening;
public class JumpController : MonoBehaviour
{
[SerializeField] private float _moveSpeed = 15f;
[SerializeField] private float _jumpForce = 30f;
[SerializeField] private Transform _cubeObjectTF;
@Ciberusps
Ciberusps / BTDecorator_LoopRandomCount.cpp
Last active April 19, 2024 12:04
Unreal AI utils, Loop with random range, TimeLimit with random interval
// Fill out your copyright notice in the Description page of Project Settings.
#include "AI/Decorators/BTDecorator_LoopRandomCount.h"
UBTDecorator_LoopRandomCount::UBTDecorator_LoopRandomCount(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
NodeName = "Loop_RandomCount";