예제 #1
0
    public void Start()
    {
        keyManager = GameHelpers.GetHUDKeyManager();
        SpriteRenderer spriteRenderer = gameObject.GetComponent <SpriteRenderer>();
        Color          color          = Color.GetColor();

        spriteRenderer.color = color;
    }
예제 #2
0
    public void Add(StandardColor color)
    {
        var key = playerState.Keys.FirstOrDefault(k => k.Color == StandardColor.None);

        if (key != null)
        {
            key.Color        = color;
            key.Render.color = color.GetColor();
            key.GameObject.SetActive(true);
        }
    }
예제 #3
0
    // Use this for initialization
    public void Start()
    {
        keyManager    = GameHelpers.GetHUDKeyManager();
        levelSettings = GameHelpers.GetLevelSettings();
        scoreObject   = gameObject.GetComponent <ScoreObject>();

        if (KeyColor != StandardColor.None)
        {
            gameObject.GetComponent <SpriteRenderer>().color = KeyColor.GetColor();
        }

        //if (KeyColor != StandardColor.None)
        //{
        //    var keyObject = gameObject.transform.Find(StaticNames.DoorKey).gameObject;
        //    SpriteRenderer spriteRenderer = keyObject.GetComponent<SpriteRenderer>();
        //    Color color = KeyColor.GetColor();
        //    spriteRenderer.color = color;
        //}
    }