摘要: 前置需求 创建一个动画混合空间,水平坐标为value区间为-1到1(宠物朝向),垂直坐标为speed区间为0到2(宠物速度),放入动画蓝图。 一,定点移动 首先,实现宠物移动需要设置速度,朝向,目的地三个变量。在宠物类中定义变量。 在玩家操控角色类中通过线条碰撞检测,来获取碰撞地点为要前往的目的地。 阅读全文
posted @ 2020-07-26 16:14 痞卡皮 阅读(414) 评论(0) 推荐(0) 编辑
摘要: 01背包 完全背包 多重背包(优化) 分组背包 混合背包 阅读全文
posted @ 2019-10-10 18:49 痞卡皮 阅读(158) 评论(0) 推荐(0) 编辑
摘要: #include <cstdio> #include <cmath> using namespace std; void dg(int n) { int a; if(n==0) return; for(int i=0;i<=15;i++) //求出n以内2最大的a次方 { a=i; if(pow(2,a)>n) { a--; break; } } if(a==0) printf("2(0)"); 阅读全文
posted @ 2019-09-05 21:17 痞卡皮 阅读(260) 评论(0) 推荐(0) 编辑
摘要: js代码: 阅读全文
posted @ 2019-09-04 10:08 痞卡皮 阅读(758) 评论(0) 推荐(0) 编辑
摘要: ↑杭电oj 1213 阅读全文
posted @ 2019-04-12 20:54 痞卡皮 阅读(106) 评论(0) 推荐(0) 编辑
摘要: ↑杭电oj 1061 #include <cstdio>#include <cstring>using namespace std;int ksm(int n,int m){ int res=1; while(m!=0) { if(m&1) res=res*n%10; n=n*n%10; m>>=1 阅读全文
posted @ 2019-04-12 20:08 痞卡皮 阅读(107) 评论(0) 推荐(0) 编辑
摘要: ↑杭电oj 1166 #include <cstdio>#include <cstring>using namespace std;const int MAXN=50005;int c[MAXN],t,i,a,b,n,k;int lowbit(int id){ return id&-id;}void 阅读全文
posted @ 2019-04-12 16:40 痞卡皮 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 杭电oj 2544 深 搜 弗 洛 伊 德(Floyd) 第 杰 斯 特 拉 #include <iostream> #include <cstring> #include <cstdio> using namespace std; int mp[1002][1002]; bool use[1002 阅读全文
posted @ 2019-04-12 14:25 痞卡皮 阅读(274) 评论(2) 推荐(1) 编辑