Пример #1
0
    // Use this for initialization
    public void Start()
    {
        source         = GetComponent <AudioSource>();
        shellCount     = 0;
        rb             = GetComponent <Rigidbody2D>();
        shellList      = GameObject.FindGameObjectWithTag("ShellData").GetComponent <ShellList>();
        spriteRenderer = GetComponentInChildren <SpriteRenderer>();
        velocity       = new Vector3(0, 0, 0);
        timing         = timer;
        stacker        = GetComponent <ShellStack>();
        int shellType = -1;
        int worth     = startingShells;

        for (int i = 0; i < worth; i++)
        {
            int addType = (shellType == -1) ? (int)Random.Range(0, shellList.shellSprite.Length) : shellType;
            if (shellCount == 0)
            {
                spriteRenderer.sprite = shellList.playerShellSprite[addType];
                mySpriteId            = addType;
            }
            else
            {
                stacker.addShell(addType);
            }
            shellCount++;
        }
    }
Пример #2
0
 void Awake()
 {
     shellList         = GameObject.FindGameObjectWithTag("ShellData").GetComponent <ShellList>();
     rotationDirection = 1;
     children          = new List <Transform>();
     shellId           = new List <int>();
 }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     shellAdder = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Movement>();
     if (randomizeSprite)
     {
         ShellList shellList = GameObject.FindGameObjectWithTag("ShellData").GetComponent <ShellList>();
         shellType = (int)Random.Range(0, shellList.shellSprite.Length);
         GetComponent <SpriteRenderer>().sprite = shellList.shellSprite[shellType];
     }
 }
Пример #4
0
        private void Initalize()
        {
            ThemeOutput = Bash(@"
                        for f in ~/.themes/*
                        do
                            if [[ -d ""$f/gtk-3.0"" ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ") +
                          Bash(@"
                        for f in /usr/share/themes/*
                        do
                            if [[ -d ""$f/gtk-3.0"" ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done");
            IconOutput = Bash(@"for f in /usr/share/icons/*
                        do
                            if [[ -f ""$f/index.theme""     ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ")
                         + Bash(@"for f in ~/.local/share/icons/*
                        do
                            if [[ -f ""$f/index.theme""  ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ")
                         + Bash(@"for f in ~/.icons/*
                        do
                            if [[ -f ""$f/index.theme""  ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ");

            CursorOutput = Bash(@"for f in /usr/share/icons/*
                        do
                            if [[ -f ""$f/index.theme""  &&    -d ""$f/cursors"" ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ")
                           + Bash(@"for f in ~/.local/share/icons/*
                       do
                            if [[ -f ""$f/index.theme""  &&    -d ""$f/cursors"" ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ")
                           + Bash(@"for f in ~/.icons/*
                       do
                            if [[ -f ""$f/index.theme""  &&    -d ""$f/cursors"" ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ");



            ShellOutput = Bash(@"
                        for f in /usr/share/themes/*
                        do
                            if [[ -d ""$f/gnome-shell"" ]]
                                    then
                                        
                                        echo $(basename -- ""$f"")
                                        fi
                                    done") + Bash(@"
                        for f in ~/.themes/*
                        do
                            if [[ -d ""$f/gnome-shell"" ]]
                                    then
                                        echo $(basename -- ""$f"")
                                        fi
                                    done");

            Box box = new Box(Orientation.Vertical, 6);

            ThemeList = ThemeOutput.Split("\n").ToList();
            ThemeList.RemoveAll(s => string.IsNullOrWhiteSpace(s));
            // ThemeList.ForEach(s=>Console.Write(s+"\n"));
            ThemeList = ThemeList.Distinct().ToList();
            ThemeList.Sort();

            IconList = IconOutput.Split("\n").ToList();
            IconList.RemoveAll(s => string.IsNullOrWhiteSpace(s));
            // IconList.ForEach(s=>Console.Write(s+"\n"));
            IconList = IconList.Distinct().ToList();
            IconList.Sort();

            ShellList = ShellOutput.Split("\n").ToList();
            ShellList.RemoveAll(s => string.IsNullOrWhiteSpace(s));
            // iconList.ForEach(s=>Console.Write(s+"\n"));
            ShellList = ShellList.Distinct().ToList();
            ShellList.Sort();

            CursorList = CursorOutput.Split("\n").ToList();
            CursorList.RemoveAll(s => string.IsNullOrWhiteSpace(s));
            CursorList = CursorList.Distinct().ToList();
            CursorList.Sort();
            UserThemeExtensionExists = CheckUserThemeExtExists();
        }