Exemplo n.º 1
0
        public bool CreateSheet()
        {
            NewSheet newSheet = new NewSheet();

            this.BasicSheet = newSheet.Get();
            return(true);
        }
Exemplo n.º 2
0
 private void ShowSheetStatus(BasicSheet sheet)
 {
     Console.WriteLine("Strengh: {0}", sheet.Strengh);
     Console.WriteLine("Dexterity: {0}", sheet.Dexterity);
     Console.WriteLine("Inteligence: {0}", sheet.Inteligence);
     Console.WriteLine("Endurance: {0}", sheet.Endurance);
     Console.WriteLine("Wisdom: {0}", sheet.Wisdom);
     Console.WriteLine("Will: {0}", sheet.Will);
 }
Exemplo n.º 3
0
        public bool GenerateSheet(BasicSheet sheet)
        {
            CommonSheet commonSheet = new CommonSheet();

            if (commonSheet.GenerateStatus(sheet))
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 4
0
    void GenEffects()
    {
        SymbolSheet symbolSheet = LoadMachineExcelAsset <SymbolSheet, SymbolData>(_config._machineName, "Symbol");
        BasicSheet  basicSheet  = LoadMachineExcelAsset <BasicSheet, BasicData>(_config._machineName, "Basic");

        string srcPath  = "";
        string destName = "";
        string destPath = "";

        //symbol effects
        ListUtility.ForEach(symbolSheet.DataArray, (SymbolData data) => {
            srcPath = Path.Combine(_presetAssetPath, "FX_SymbolEffect_Preset.prefab");

            if (!string.IsNullOrEmpty(data.WinEffect))
            {
                destName = data.WinEffect;
            }
            else if (!string.IsNullOrEmpty(data.WinEffect3D))
            {
                destName = data.WinEffect3D;
            }
            else
            {
                destName = "";
            }

            if (!string.IsNullOrEmpty(destName))
            {
                destPath  = _config._isDownloadMachine ? _effectsPathOfRemoteMachine : _effectsPathOfLocalMachine;
                destPath  = Path.Combine(destPath, destName);
                destPath += ".prefab";

                string dir = Path.GetDirectoryName(destPath);
                if (!Directory.Exists(dir))
                {
                    Directory.CreateDirectory(dir);
                }

                TryCopyAsset(srcPath, destPath);
                SetAssetBundleName(destPath);
            }
        });

        //super symbol
//		string superSymbolName = BasicValueFromKey(basicSheet.DataArray, "SuperSymbolLightEffect");
//		if(!string.IsNullOrEmpty(superSymbolName))
//		{
//			srcPath = Path.Combine(_presetAssetPath, "FX_Spin_SuperSymbol_ReelLight.prefab");
//
//			destPath = _config._isDownloadMachine ? _effectsPathOfRemoteMachine : _effectsPathOfLocalMachine;
//			destPath = Path.Combine(destPath, superSymbolName);
//
//			TryCopyAsset(srcPath, destPath);
//		}
    }
Exemplo n.º 5
0
        public bool CreateCharacter(BasicSheet sheet)
        {
            NewCharacter newCharacter = new NewCharacter();

            Character = newCharacter.Get(sheet);
            DataCharacter dataCharacter = new DataCharacter();

            dataCharacter.Save(Character);


            return(true);
        }
Exemplo n.º 6
0
        public bool GenerateStatus(BasicSheet sheet)
        {
            Random random = new Random();

            sheet.Strengh     = random.Next(1, 10);
            sheet.Dexterity   = random.Next(1, 10);
            sheet.Inteligence = random.Next(1, 10);
            sheet.Endurance   = random.Next(1, 10);
            sheet.Wisdom      = random.Next(1, 10);
            sheet.Will        = random.Next(1, 10);

            return(true);
        }
Exemplo n.º 7
0
        public bool ShowForm()
        {
            NewSheet        newSheet        = new NewSheet();
            BasicSheet      sheet           = newSheet.Get();
            ControllerSheet controllerSheet = new ControllerSheet();

            string confirm = "";

            do
            {
                Console.Clear();
                Console.WriteLine("Charater info:");
                Console.WriteLine("Name:");
                sheet.Name = Console.ReadLine();
                Console.WriteLine("Sex:");
                sheet.Genre = (Console.ReadLine())[0];
                Console.WriteLine("Age:");
                sheet.Age = int.Parse(Console.ReadLine());

                Console.WriteLine("Confirm?(yes/no)");
                confirm = Console.ReadLine();
            } while (!confirm.Equals("yes"));

            confirm = "";

            do
            {
                Console.Clear();
                if (controllerSheet.GenerateSheet(sheet))
                {
                    Console.WriteLine("SheetResult");
                    ShowSheetStatus(sheet);
                    Console.WriteLine("Confirm?(yes/no)");
                    confirm = Console.ReadLine();
                }
            } while (!confirm.Equals("yes"));

            CommonCharacter commonCharacter = new CommonCharacter();

            Console.Clear();
            if (commonCharacter.CreateCharacter(sheet))
            {
                Console.WriteLine("Character create successfully");
            }
            else
            {
                Console.WriteLine("Couldn't create a character");
            }
            Console.ReadKey();
            return(true);
        }
Exemplo n.º 8
0
 public Character Get(BasicSheet basicSheet)
 {
     return(new Character(basicSheet));
 }