Example #1
0
 public void Initialize(ClickerType type)
 {
     _autoClickerType = type;
     SetSillhouette();
     SetButtonTextToCost(type);
     GetComponent<Button>().interactable = false;
 }
Example #2
0
 public void Initialize(GameMaster gameMaster, ClickerType clickerType)
 {
     ClickerType = clickerType;
     StackedClickers = 1;
     _gameMaster = gameMaster;
     SetNewMoveDirection();
     _particleSystem = GetComponent<ParticleSystem>();
 }
Example #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;
    }
Example #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);
 }
Example #5
0
 private void SetButtonTextToCost(ClickerType type)
 {
     gameObject.GetComponent<Button>().GetComponentInChildren<Text>().text = type.Cost.ToString();
 }