LoginSignup
0
0

More than 5 years have passed since last update.

構造体を定義するメモ

Last updated at Posted at 2015-02-15

定義の仕方をいつも忘れてしまうのでメモ

typedefを使って、クラスの外に定義する。

typedef.hx
typedef Point = { x : Int, y : Int }

class Path {
    var start : Point;
    var target : Point;
    var current : Point;
}

参考

もっと詳しく書いてある
http://old.haxe.org/manual/struct?version=17720

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0