- 博客(14)
- 收藏
- 关注
原创 游戏快捷键系统架构(正式版)
目的:基于引擎提供的两个接口“按键按下回调”(参数为按键id用以标识哪个按键,任意按键按下时调用)和“按键抬起回掉”构建快捷键系统,要求能够通过此模块注册(组合)快捷键和注销(组合)快捷键,快捷键有绑定的函数,按下抬起被注册的快捷键时执行绑定的函数做法:核心的函数是一个注册函数,这个注册函数的参数表有:1.快捷键列表,单个快捷键的话,列表中就只有一个按键。2.快捷键对应函数,此函数
2017-01-07 17:52:29
511
原创 游戏快捷键系统架构(第一版)
目的:基于引擎提供的两个接口“按键按下回调”(参数为按键id,任意按键按下时调用)和“按键抬起回掉”构建快捷键系统,要求能够通过此模块注册(组合)快捷键和注销(组合)快捷键,快捷键有绑定的函数,按下抬起被注册的快捷键时执行绑定的函数 流程:按键按下之后引擎回掉“按键按下回调”函数,客户端记录当前这个按下的按键到一个列表中,当按键抬起回掉”函数响应的时候需要把对应的按键从
2016-12-24 14:21:27
703
原创 设置Eclipse中的tab键为4个空格的完整方法(Pydev)
https://my.oschina.net/xunxun10/blog/1100741.点击 window->preference-,依次选择 General->Editors->Text Editors,选中右侧的 insert space for tabs;如下图所示,保存,第一步完成;2.点击 window->preference-,依次选择 java(或C
2016-12-19 15:44:09
4340
原创 笔试要点
http://blog.youkuaiyun.com/zziymt/article/details/525244191.指针数组和数组指针int * p,int (* p),(int *) p2.virtual用法,虚函数,纯虚函数3.各种树极其时间复杂度,空间复杂度
2016-12-11 10:43:45
271
原创 [leetcode]217. Contains Duplicate
Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element is
2016-12-08 15:16:26
332
原创 [leetcode]263. Ugly Number丑数
Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 6, 8 are ugly while 14 is not ugly si
2016-12-08 11:10:28
344
原创 VSCode快捷键设置
keybindings.json// 将键绑定放入此文件中以覆盖默认值[ { "key": "ctrl+d", "command": "editor.action.deleteLines", "when": "editorTextFocus && !editorReadonly"
2016-12-07 11:07:41
6447
1
原创 [LeetCode]414. Third Maximum Number第三大的数
Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in O(n).给一个非空的整形数组,返回这个数组中第三大的数。如果它
2016-12-06 15:12:21
514
原创 [LeetCode]258. Add Digits
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has on
2016-10-09 20:59:46
414
原创 [LeetCode]389. Find the Difference
class Solution {public: char findTheDifference(string s, string t) { int i,l; int record[26]; for(i = 0;i<26;i++) { record[i] = 0; }
2016-10-09 20:57:05
303
原创 [LeetCode]371. Sum of Two Integers
Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.Example:Given a = 1 and b = 2, return 3.class Solution {public: int getSum(int a, int b) {
2016-10-09 20:44:17
217
原创 [LeetCode]292. Nim Game
You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone will be the
2016-10-09 20:42:54
230
原创 [LeetCode]344. Reverse String
Write a function that takes a string as input and returns the string reversed.Example: Given s = “hello”, return “olleh”.class Solution {public: string reverseString(string s) { string re
2016-10-09 20:15:01
221
原创 音效系统实现:事件音效
事件音效事件音效,就是当一个事件发生的时候播放一个音效,所以音效一般依附于一个事件,从代码的角度上来讲就是系统调用某个函数的时候进行条件判断然后播放相应的音效.这一系列的音效比较多,也比较杂,因为音效依附的各个事件一般是完全不相关的.在不考虑音效实现的情况下,现在我们假设已经实现了一个事件音效的接口,每当调用这个接口的时候只需要传给它一个编号,它就能正常的播放音效.以下是几类事件音效.
2016-03-14 14:48:25
945
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人