09 2019 档案

摘要:下面介绍Info类,界面的显示大部分都是由它来完成,init函数中create_info_labels函数创建通用的信息,create_state_labels函数对于不同的状态,会初始化不同的信息。 class Info(): def __init__(self, game_info, state 阅读全文
posted @ 2019-09-17 17:48 水至清明 阅读(446) 评论(0) 推荐(0) 编辑
摘要:Control 是状态机类,main函数是游戏的主循环,setup_states函数设置游戏启动时运行的状态。 class Control(): def __init__(self): self.screen = pg.display.get_surface() self.done = False 阅读全文
posted @ 2019-09-17 17:48 水至清明 阅读(345) 评论(0) 推荐(0) 编辑
摘要:有两个文件constants.py 和 state_demo.pyconstants.py 保存了所有的字符串定义和常量 constants.pyGAME_TIME_OUT 表示游戏的超时时间,这边为了demo演示,设成了5秒,实际是300秒。 SCREEN_HEIGHT = 600SCREEN_W 阅读全文
posted @ 2019-09-17 17:48 水至清明 阅读(594) 评论(0) 推荐(0) 编辑
摘要:private int curATK;private int curAtkKey;public int CurATK { get { return curATK ^ curAtkKey; }(http://www.my516.com) set { curAtkKey = Random.Range(0 阅读全文
posted @ 2019-09-17 17:48 水至清明 阅读(707) 评论(0) 推荐(0) 编辑
摘要:先定义一个State 基类, 按照上面说的状态需要的三个操作分别定义函数(startup, update, cleanup)。在 init 函数中定义了上面说的三个变量(next,persist,done),还有start_time 和 current_time 用于记录时间。 class Stat 阅读全文
posted @ 2019-09-17 17:46 水至清明 阅读(385) 评论(1) 推荐(0) 编辑
摘要:先看一个使用Handler的简单实例:先不考虑Handler造成的内存泄漏问题 package cn.zzw.messenger.handlerdemo; import androidx.annotation.NonNull;import androidx.appcompat.app.AppComp 阅读全文
posted @ 2019-09-12 17:24 水至清明 阅读(290) 评论(0) 推荐(0) 编辑
摘要:初始化Handler对象的时候,使用的是无参的构造方法: public Handler() { this(null, false); }可以看到它内部调用的是另外一个两个参数的构造方法: public Handler(Callback callback, boolean async) { if (F 阅读全文
posted @ 2019-09-12 17:24 水至清明 阅读(182) 评论(0) 推荐(0) 编辑
摘要:3.1 客户端步骤: 3.1.1 创建一个handler对象,并实现 handleMessage() 方法,用户接收客户端的消息。 3.1.2 创建Messenger ,封装handler。 3.1.3 用Messenger的 getBinder() 方法获取一个IBinder对象,通过 onBin 阅读全文
posted @ 2019-09-12 17:24 水至清明 阅读(537) 评论(0) 推荐(0) 编辑
摘要:client端的log: E/MessengerClient: mService.sendE/MessengerClient: mService.send handleMessage handleMessage:510E/MessengerClient: handleMessage handleMe 阅读全文
posted @ 2019-09-12 17:23 水至清明 阅读(175) 评论(0) 推荐(0) 编辑
摘要:在kvm内部定义了线程状态,如下: enum { THREAD_JUST_BORN = 1, /* 还没有启动*/ THREAD_ACTIVE = 2, /* 当前正在运行,或者在等待运行的队列中*/ THREAD_SUSPENDED = 4, /* 等待monitor或者alarm */ THRE 阅读全文
posted @ 2019-09-12 17:23 水至清明 阅读(138) 评论(0) 推荐(0) 编辑
摘要:class GenClass<T>{ public void Note(T t) { Console.WriteLine(t); }}调用 var ass = Assembly.Load("TextCord");//反射调用泛型var type_q = ass.GetType("TextCord.G 阅读全文
posted @ 2019-09-10 17:07 水至清明 阅读(375) 评论(0) 推荐(0) 编辑
摘要:A************* A*************B*************//Banner轮播implementation 'com.youth.banner:banner:1.1.5'//ButterKnife注解 annotationProcessor 'com.jakewharto 阅读全文
posted @ 2019-09-10 17:07 水至清明 阅读(490) 评论(0) 推荐(0) 编辑
摘要:class SingLeton{ private static SingLeton inntleton = null; private ArrayList stlit = null; //私有构造函数 private SingLeton() { } public static SingLeton s 阅读全文
posted @ 2019-09-10 17:07 水至清明 阅读(205) 评论(0) 推荐(0) 编辑
摘要:<1>首先需要注册个第三方的账户,比如秒嘀科技等,然后拿到三个参数值:QUERAY_PATH ACCOUNT_SID AUTH_TOKEN<2>编写获取验证码类getMessage.java private static final String QUERAY_PATH="xxxx"; privat 阅读全文
posted @ 2019-09-10 17:07 水至清明 阅读(980) 评论(0) 推荐(0) 编辑
摘要:@ApiImplicitParams({ @ApiImplicitParam(name="mobile",value="手机号",required=true,paramType="form"), @ApiImplicitParam(name="password",value="密码",require 阅读全文
posted @ 2019-09-10 17:07 水至清明 阅读(278) 评论(0) 推荐(0) 编辑
摘要:一 代码 import java.awt.*;import java.awt.event.*;public class DrawTurtle{ private int x, y; public static void main(String[] args) { new DrawTurtle(); } 阅读全文
posted @ 2019-09-09 14:10 水至清明 阅读(230) 评论(0) 推荐(0) 编辑
摘要:void CmapwingisTest2View::OnWindowsZoomin() { m_map.SetCursorMode(cmZoomIn); //放大 } void CmapwingisTest2View::OnWindowsZoomout()//缩小 { m_map.SetCursor 阅读全文
posted @ 2019-09-09 14:09 水至清明 阅读(297) 评论(0) 推荐(0) 编辑
摘要:void CmapwingisTest2View::OnToolsAddLayer() { TCHAR szFilters[]= _T("TIFF Files (*.tif)|*.tif|SHP Files (*.shp)|*.shp||"); CFileDialog fileDlg (TRUE,_ 阅读全文
posted @ 2019-09-09 14:09 水至清明 阅读(190) 评论(0) 推荐(0) 编辑
摘要:m_pMainWnd->ShowWindow(SW_SHOWDEFAULT);//解决窗体最大化问题 m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED); m_pMainWnd->UpdateWindow(http://www.amjmh.com/v/); 实现控件随着 阅读全文
posted @ 2019-09-09 14:09 水至清明 阅读(177) 评论(0) 推荐(0) 编辑
摘要:import java.awt.*;import java.awt.event.*;public class DrawTurtle{ private int x, y; public static void main(String[] args) { new DrawTurtle(); } publ 阅读全文
posted @ 2019-09-09 14:09 水至清明 阅读(116) 评论(0) 推荐(0) 编辑
摘要:一.源代码使用教程及环境配置1.环境配置打开pycharm,进入file,打开settings 打开project interpreter,点击右上方 + 号 搜索pygame模块并导入 到此环境就配置好了。 2.源代码使用教程创建一个新的python文件夹命名为“飞机”在新文件夹下再创建一个文件夹 阅读全文
posted @ 2019-09-08 21:08 水至清明 阅读(440) 评论(0) 推荐(0) 编辑
摘要:Shader "Unlit/360AlphaTest"{ Properties{ _MainTex("Base (RGB)", 2D) = "white" {} _Cutoff("Alpha Cutoff", Range(0, 1)) = 0.5 } SubShader{ Tags {"Queue" 阅读全文
posted @ 2019-09-08 21:08 水至清明 阅读(152) 评论(0) 推荐(0) 编辑
摘要:using System.Collections;using System.Collections.Generic;using UnityEngine;using ZXing;using UnityEngine.UI;/// <summary>/// 二维码扫描识别功能/// </summary>p 阅读全文
posted @ 2019-09-08 21:08 水至清明 阅读(376) 评论(0) 推荐(0) 编辑
摘要:using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.UI;using ZXing;//二维码的生成public class TestQRCodeDraw : Mon 阅读全文
posted @ 2019-09-08 21:08 水至清明 阅读(356) 评论(0) 推荐(0) 编辑
摘要:在pubspec.yaml下添加flame插件,并通过flutter packages get命令下载插件,或者使用Visual Studio Code保存文件会自动下载插件。 dependencies: flutter: sdk: flutter cupertino_icons: ^0.1.2 f 阅读全文
posted @ 2019-09-08 21:08 水至清明 阅读(665) 评论(0) 推荐(0) 编辑
摘要:查询结果截图: 区别: 名称 作用CoplanarPolygonGeometry CoplanarPolygonOutlineGeometry PolygonGeometry 这个好像是给底层用的PolygonGeometryUpdater 一般客户端不用PolygonHierarchy 定义多边形 阅读全文
posted @ 2019-09-04 17:10 水至清明 阅读(11673) 评论(0) 推荐(0) 编辑
摘要:三角形的绘制实现类。 //// Created by ByteFlow on 2019/7/9.// #include "TriangleSample.h"#include "../util/GLUtils.h"#include "../util/LogUtil.h" TriangleSample: 阅读全文
posted @ 2019-09-04 17:10 水至清明 阅读(254) 评论(0) 推荐(0) 编辑
摘要:简单自定义 GLSurfaceView。 package com.byteflow.app; import android.content.Context;import android.opengl.GLSurfaceView;import android.util.AttributeSet;imp 阅读全文
posted @ 2019-09-04 17:10 水至清明 阅读(473) 评论(0) 推荐(0) 编辑
摘要:OpenGLES 3.0 着色器脚本 #version 300 es layout(location = 0) in vec4 vPosition; void main() { gl_Position = vPosition; } 123456其中,#version 300 es 为 OpenGLE 阅读全文
posted @ 2019-09-04 17:10 水至清明 阅读(447) 评论(0) 推荐(0) 编辑
摘要://—1 自己控制球的弹跳力代码如下 —2) 在Project视图中给球添加Physical Materical 设置弹力以后 拉给球的Collider的Materical 属性)SphereCollider sphereCollider;public float bounceSpeed;publi 阅读全文
posted @ 2019-09-04 17:09 水至清明 阅读(394) 评论(0) 推荐(0) 编辑
摘要:Calendar类,专门用于转换特定时刻和日历字段之间的日期和时间。 使用Calendar 获取当前日期和时间非常简单: Calendar calendar = Calendar.getInstance(); // gets current instance of the calendar 与dat 阅读全文
posted @ 2019-09-02 19:07 水至清明 阅读(672) 评论(0) 推荐(0) 编辑
摘要:Java 8提供了一个全新的API,用以替换java.util.Date和java.util.Calendar。Date / Time API提供了多个类,帮助我们来完成工作,包括: LocalDateLocalTimeLocalDateTimeZonedDateTime—————————————— 阅读全文
posted @ 2019-09-02 19:07 水至清明 阅读(235) 评论(0) 推荐(0) 编辑
摘要:LocalDate只是一个日期,没有时间。 这意味着我们只能获得当前日期,但没有一天的具体时间。 LocalDate date = LocalDate.now(); // gets the current date 我们可以format它 DateTimeFormatter formatter = 阅读全文
posted @ 2019-09-02 19:07 水至清明 阅读(332) 评论(0) 推荐(0) 编辑
摘要:LocalTime与LocalDate相反,它只代表一个时间,没有日期。 这意味着我们只能获得当天的当前时间,而不是实际日期: LocalTime time = LocalTime.now(); // gets the current time 可以按如下方式format DateTimeForma 阅读全文
posted @ 2019-09-02 19:07 水至清明 阅读(665) 评论(0) 推荐(0) 编辑
摘要:最后一个是LocalDateTime,也是Java中最常用的Date / Time类,代表前两个累的组合 - 即日期和时间的值: LocalDateTime dateTime = LocalDateTime.now(); // gets the current date and time forma 阅读全文
posted @ 2019-09-02 19:07 水至清明 阅读(726) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示