Exemplo n.º 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);
        }
Exemplo n.º 2
0
    private void Awake()
    {
        if (Instance != null)
        {
            throw new System.Exception();
        }

        Instance = this;
    }
Exemplo n.º 3
0
    void Awake()
    {
        if (instance != null)
        {
            return;
        }
        instance = this;

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