예제 #1
0
        public override void Initialize()
        {
            LightId = LightEngine.CreateDirectionalLight(Direction, Color.R / 255f, this.Color.G / 255f, this.Color.B / 255f);
            LightEngine.SetLightProperties(LightId, true, false, false);

            // Register object in Lua.
            ScriptManager.SetGlobal(Name, this);
        }
예제 #2
0
    private void Awake()
    {
        if (Instance != null)
        {
            throw new System.Exception();
        }

        Instance = this;
    }
예제 #3
0
    void Awake()
    {
        if (instance != null)
        {
            return;
        }
        instance = this;

        InitGame();
        StartLevel();
    }
예제 #4
0
 public override void Dispose()
 {
     LightEngine.DeleteLight(LightId);
 }
예제 #5
0
 public void SetColor(float r, float g, float b)
 {
     LightEngine.SetLightColor(LightId, r / 255f, g / 255f, b / 255f);
 }
예제 #6
0
 public void SetDirection(float x, float y, float z)
 {
     LightEngine.SetLightDirection(LightId, x, y, z);
 }
예제 #7
0
 public void Disable()
 {
     LightEngine.EnableLight(LightId, false);
 }
예제 #8
0
 public void Enable()
 {
     LightEngine.EnableLight(LightId, true);
 }
예제 #9
0
 public void SetPosition(float x, float y, float z)
 {
     Position = new TV_3DVECTOR(x, y, z);
     LightEngine.SetLightPosition(LightId, x, y, z);
 }
예제 #10
0
 public void SetRadius(float radius)
 {
     LightEngine.SetLightRange(LightId, radius);
 }
예제 #11
0
 void Start()
 {
     LightEngine.Register(this);
 }
예제 #12
0
 private void OnDestroy()
 {
     LightEngine.Unregister(this);
 }