Coder Social home page Coder Social logo

gamemaker-wheat_ptr's Introduction

GameMaker-wheat_ptr

你可以使用两种方式来创建一个 小麦指针:

p = make_wheat_ptr(); // 使用该方式创建的 wheat_ptr 不需要手动释放内存
p = new wheat_ptr(); // 使用该方式创建的 wheat_ptr 需要手动 delete 来释放内存

// 当你在写下这两行时,鼠标悬停在 make_wheat_ptr() 或 wheat_ptr() 上,能看到我写的注释,你可以根据这些注释来进行初始化工作

一些成员函数:

p.point() // 指向目标
p.value() // 获取值,若获取失败会返回 undefined
p.set()   // 设定值到指向的变量,成功返回 true,失败返回 false
p.get()   // 返回该 wheat_ptr 所指向的目标相关的数据,返回结果也是一个结构体,但是并非用 new 创建,所以不需要手动释放内存
p.swap()  // 互换两个 wheat_ptr 所指向的目标(不会对被指向的变量的值产生影响),成功返回 true,失败返回 false

// 详细参数请将鼠标放在对应的函数上查看注释

gamemaker-wheat_ptr's People

Contributors

wheatbox avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.