コード例 #1
0
ファイル: PlayerProps.cs プロジェクト: njchensl/TestUnity2D
    public static unsafe PlayerProps *CreatePlayerProps()
    {
        PlayerProps *props = (PlayerProps *)malloc((ulong)sizeof(PlayerProps));

        // init fields
        props->Health = 1.0f;
        props->Hunger = 1.0f;
        return(props);
    }
コード例 #2
0
 void Start()
 {
     m_PlayerProps = PlayerProps.CreatePlayerProps();
 }