小编use*_*250的帖子

LibGDX - Gdx.graphics.getWidth()如何返回显示表面的宽度?

我想更多地了解LibGDX的内部世界.

例如在里面Graphics.java,我发现以下内容:

/** @return the width in pixels of the display surface */ 
public int getWidth (); 
Run Code Online (Sandbox Code Playgroud)

但是,我找不到getWidth()方法的源代码.

我在哪里可以找到getWidth()方法源代码?

java android libgdx

4
推荐指数
1
解决办法
1552
查看次数

C# 是一种类型安全的语言吗?我的例子怎么样

我正在用 C# 测试以下代码,它可以成功运行。我的问题是我可以在下面的例子中将一种类型的数据分配给另一种类型的数据,但为什么它仍然被称为类型安全语言?谢谢。

using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.RegularExpressions;

    namespace Rextester
    {
        public class Program
        {
            public static void Main(string[] args)
            {
               var intNum = 5;
               var strNum = "5";
               var result = intNum + strNum;         
               Console.WriteLine(result);
            }
        }
    }
Run Code Online (Sandbox Code Playgroud)

可以编译成功,结果是55。

c# typesafe

4
推荐指数
1
解决办法
1599
查看次数

谁能给我一个关于"self = super init"的简单解释?

我还是不明白self = super init; 虽然我读了很多书和谷歌.我知道它用于检查当前对象等于来自父类等的返回对象.但是,我不能接受这就是答案.有人可以给我一个简单但可靠的答案吗?谢谢!

iphone xcode

0
推荐指数
1
解决办法
277
查看次数

标签 统计

android ×1

c# ×1

iphone ×1

java ×1

libgdx ×1

typesafe ×1

xcode ×1