Beispiel #1
0
    public Player(HexCell parent) : base(parent, "player")
    {
        // makes little sense
        Health = this.model.Health;

        var sprite = SpriteLoader.sprites.First(s => s.name.StartsWith("hiwky"));

        if (sprite == null)
        {
            sprite = SpriteLoader.GetRandomCharacter();
        }
        parent.GetComponentInChildren <SpriteRenderer>().sprite = sprite;
    }