예제 #1
0
파일: Wthr.cs 프로젝트: tstavrianos/patcher
 public ColorQuad(byte[] buffer, int sunrise, int day, int sunset, int night)
 {
     Sunrise = new ColorAdapter(buffer, sunrise);
     Day     = new ColorAdapter(buffer, day);
     Sunset  = new ColorAdapter(buffer, sunset);
     Night   = new ColorAdapter(buffer, night);
 }
예제 #2
0
 public void Initialize()
 {
     this.colorTextures = ColorAdapter.GetTextures(path);                                            // Read all color textures
     ColorAdapter.FillDropdown(this.colorTextures, this.dropdown);                                   // Fill the dropdown with textures
     this.InitializeDropdownListener();                                                              // Initialize listener
     this.OnDropdownChange();                                                                        // Reset current color
 }
예제 #3
0
 // Fill dropdown based on parts array
 public static void FillDropdown(Texture[] textures, Dropdown dropdown)
 {
     dropdown.options.Clear();                                                               // Clear previous options
     string[] names = ColorAdapter.GetNames(textures);                                       // Get array of names
     dropdown.captionText.text = names[0];                                                   // Set caption
     foreach (string name in names)                                                          // For each name
     {
         dropdown.options.Add(new Dropdown.OptionData(name));                                // Add it to the dropdown options
     }
 }
예제 #4
0
 public ColorOctave(byte[] buffer, int offset, int stride)
 {
     Dawn      = new ColorAdapter(buffer, offset);
     Day       = new ColorAdapter(buffer, offset + stride);
     Dusk      = new ColorAdapter(buffer, offset + stride * 2);
     Night     = new ColorAdapter(buffer, offset + stride * 3);
     EarlyDawn = new ColorAdapter(buffer, offset + stride * 4);
     LateDawn  = new ColorAdapter(buffer, offset + stride * 5);
     EarlyDusk = new ColorAdapter(buffer, offset + stride * 6);
     LateDusk  = new ColorAdapter(buffer, offset + stride * 7);
 }
예제 #5
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = inflater.Inflate(Resource.Layout.HomeLayout, container, false);

            GetColorItemsList();
            colorAdapter = new ColorAdapter(this.Activity, colorItemsList);

            listView         = view.FindViewById <ListView>(Resource.Id.myListView);
            listView.Adapter = colorAdapter;

            colorSearchView = view.FindViewById <SearchView>(Resource.Id.colorSearchView);
            colorSearchView.QueryTextSubmit += ColorSearchView_QueryTextSubmit;

            return(view);
        }
예제 #6
0
    public override void Play(GameObject target)
    {
        // Set color adapter
        _colorAdapter = ColorAdapter.Get(target);

        // Set start
        _helper.Start = _colorAdapter.GetRGB();

        if (_isRelative)
        {
            _helper.End += _helper.Start;
        }

        _helper.Play();
    }
예제 #7
0
    public override void Play(GameObject target)
    {
        // Set color adapter
        _colorAdapter = ColorAdapter.Get(target);

        // Set start
        _helper.Start = _colorAdapter.GetAlpha();

        if (_isRelative)
        {
            _helper.AddEndByStart();
        }

        _helper.Play();
    }
예제 #8
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            GetColorItemsList();
            colorAdapter     = new ColorAdapter(this, colorItemsList);
            listView         = FindViewById <ListView>(Resource.Id.myListView);
            listView.Adapter = colorAdapter;

            searchView = FindViewById <SearchView>(Resource.Id.searchView);
            searchView.QueryTextSubmit += SearchView_QueryTextSubmit;
        }
예제 #9
0
    public override void Play(GameObject target)
    {
        // Set color adapter
        _colorAdapter = ColorAdapter.Get(target);

        // Set time
        _time = 0;

        // Set visible
        _isVisible = true;

        // Set not finished
        _isFinished = false;

        // Show
        _colorAdapter.SetAlpha(1.0f, _isRecursive);
    }
예제 #10
0
        public DefaultCellMap(Cell[,] array, int square_size)
        {
            this.array = array;

            counter          = 0;
            this.square_size = square_size;
            ColorAdapter dead = new ColorAdapter(Color.Black);

            color_adapters = new DefaultColorAdapterDictionary(new List <KeyValuePair <string, ColorAdapter> >(), dead);
            color_adapters.Add("NoNeighbor", new ColorAdapter(Color.OrangeRed));
            color_adapters.Add("OneNeighbor", new ColorAdapter(Color.Yellow));
            color_adapters.Add("TwoNeighbors", new ColorAdapter(Color.Orange));
            color_adapters.Add("ThreeNeighbors", new ColorAdapter(Color.LightYellow));
            color_adapters.Add("MoreThanThreeNeighbors", new ColorAdapter(Color.LightGreen));
            color_adapters.Add("AlmostDead", new ColorAdapter(Color.DimGray));
            color_adapters.Add("Dead", dead);
            color_adapters.Add("Default", new ColorAdapter(Color.White));
            color_adapters.Add("Side", new ColorAdapter(Color.White));
        }
예제 #11
0
 public ColorLogic()
 {
     colorData = new ColorAdapter();
 }
예제 #12
0
 internal ColorProxy With(ColorAdapter adapter)
 {
     this.adapter = adapter;
     return(this);
 }
예제 #13
0
    public override void Play(GameObject target)
    {
        // Set color adapter
        _colorAdapter = ColorAdapter.Get(target);

        // Set start
        _helper.Start = _colorAdapter.GetAlpha();

        if (_isRelative)
        {
            _helper.End += _helper.Start;
        }

        _helper.Play();
    }