Exemple #1
0
 public AnimatedTexture this[ShovelState s]
 {
     get
     {
         return(textures[s]);
     }
 }
    // Function to add a new state item into the state scrollview.
    private void AddStateItem(ShovelState state)
    {
        var stateItem = Instantiate <StateItem>(_stateItemPrefab);

        stateItem.transform.SetParent(_stateRoot, false);
        stateItem.SetState(state);
        _stateItems.Add(stateItem);
    }
Exemple #3
0
 public Shovel(Rectangle position, ShovelState state, double scale, Level level) : base(position, true, scale, level)
 {
     this.state = state;
     textures   = LoadTextures <ShovelState>(0);
 }
 public void SetState(ShovelState state)
 {
     _mainText.text   = state.Name.ToUpper();
     _mainImage.color = HexToColor(state.Color);
 }