상속: MonoBehaviour
예제 #1
0
 void Awake()
 {
     if (CardManagerScript.ChecInstanceExit())
     {
         Destroy(this.gameObject);
     }
 }
예제 #2
0
    private void Start()
    {
        BattleImage = GetComponent <Image>();
        CardManagerScript cardMan = FindObjectOfType <CardManagerScript>();

        ShowCardInfo(CardManager.AllCards[Random.Range(0, cardMan.CardVariation.Length - 20)]);
        Debug.Log($" Раса {Race} Сила {ForceCard} Специализация {Specialization} картинка {BattleImage.sprite.name}");
    }
예제 #3
0
 public void Fill(string deck_name)
 {
     cards_     = new List <int>(CardManagerScript.Instance().GetDeckCards(deck_name));
     num_cards_ = cards_.Count;
     RandomizeCards();
     RegenerateEndCardIDs();
     RegenerateEndCards();
 }
예제 #4
0
파일: CardScript.cs 프로젝트: zbaker94/FTJ
    public void PrepareLocal(int card_id)
    {
        var card_back = transform.FindChild("Back").transform.FindChild("default");

        card_back.renderer.material = CardManagerScript.Instance().GetBackMaterial(card_id);
        var card_front = transform.FindChild("FrontBorder").transform.FindChild("default");

        card_front.renderer.material = CardManagerScript.Instance().GetFrontMaterial(card_id);
        card_id_ = card_id;
    }
예제 #5
0
    private void Start()
    {
        but        = GetComponent <Button>();
        CardImage  = GetComponent <Image>();
        BattleCard = FindObjectOfType <BattleCardScript>();
        Sound      = FindObjectOfType <SoundScript>();
        CardManagerScript cardMan = FindObjectOfType <CardManagerScript>();

        game          = FindObjectOfType <GameManagerScript>();
        DefaultParent = transform.parent;
        ScaleCard     = transform.localScale;
        transformCard = transform.parent.position;
        FreeCard      = GameObject.Find("FreeCard");
        TransFree     = FreeCard.transform.position;

        #region Присваивание рандомного значения карты, в зависимости от хода и введение ее в список руки игрока
        ShowCardInfo(CardManager.AllCards[Random.Range(0, cardMan.CardVariation.Length)]);
        game.CurrentGame.PlayerHand.Add(SelfCard);
        if (game.Road == 1)
        {
            game.CurrentGame.PlayerHand.RemoveAt(0);
        }
        #endregion
    }
예제 #6
0
 private void Awake()
 {
     current = this;
 }