예제 #1
0
    public override void Initialize()
    {
        CostController      = NumberController.Create("Cost_Controller", this.gameObject, new Vector3(-1.375f, 2.15f, 0f), 43, 0.5f);
        AttackController    = NumberController.Create("Attack_Controller", this.gameObject, new Vector3(-1.35f, -2.15f, 0f), 43, 0.5f);
        AttributeController = NumberController.Create("Attribute_Controller", this.gameObject, new Vector3(1.5f, -2.15f, 0f), 43, 0.5f);

        CardRenderer = CreateRenderer("Card_Sprite", Vector3.one, Vector3.zero, 42);

        switch (Card.GetCardType())
        {
        case CardType.Weapon:
            ComboGlowRenderer = CreateRenderer("ComboGlow_Sprite", Vector3.one * 2.5f, new Vector3(0.0375f, 0.025f, 0f), 41);
            GreenGlowRenderer = CreateRenderer("GreenGlow_Sprite", Vector3.one * 2.5f, new Vector3(0.0375f, 0.025f, 0f), 40);
            break;

        case CardType.Spell:
            ComboGlowRenderer = CreateRenderer("ComboGlow_Sprite", Vector3.one * 2.5f, Vector3.zero, 41);
            GreenGlowRenderer = CreateRenderer("GreenGlow_Sprite", Vector3.one * 2.5f, Vector3.zero, 40);
            break;

        case CardType.Minion:
            ComboGlowRenderer = CreateRenderer("ComboGlow_Sprite", Vector3.one * 2.5f, new Vector3(0.07f, 0f, 0f), 41);
            GreenGlowRenderer = CreateRenderer("GreenGlow_Sprite", Vector3.one * 2.5f, new Vector3(0.07f, 0f, 0f), 40);
            break;
        }

        CardRenderer.enabled = true;

        UpdateSprites();
        UpdateNumbers();
    }