예제 #1
0
 public void Initialize(ClickerType type)
 {
     _autoClickerType = type;
     SetSillhouette();
     SetButtonTextToCost(type);
     GetComponent<Button>().interactable = false;
 }
예제 #2
0
 public void Initialize(GameMaster gameMaster, ClickerType clickerType)
 {
     ClickerType = clickerType;
     StackedClickers = 1;
     _gameMaster = gameMaster;
     SetNewMoveDirection();
     _particleSystem = GetComponent<ParticleSystem>();
 }
예제 #3
0
    public ClickerType CloneWithRandom()
    {
        var newWithRandom = new ClickerType
        {
            Name = Name,
            MoveTime = GetWithRandomOffset(MoveTime),
            MoveSpeed = MoveSpeed,
            DigTime = GetWithRandomOffset(DigTime),
            Income = Income,
            Cost = Cost
        };

        return newWithRandom;
    }
예제 #4
0
 private void AddAutoClickerButtonToMenu(ClickerType type)
 {
     var button = Instantiate(BuyAutoClickerButton).GetComponent<Button>();
     button.GetComponent<AutoClickerButton>().Initialize(type);
     button.onClick.AddListener(() => PlayerBuyAutoClicker(type.Name));
     button.transform.SetParent(AutoClickerBuyWindow.transform, false);
 }
예제 #5
0
 private void SetButtonTextToCost(ClickerType type)
 {
     gameObject.GetComponent<Button>().GetComponentInChildren<Text>().text = type.Cost.ToString();
 }