// Start is called before the first frame update
 void Start()
 {
     enemy_Generator        = this.gameObject.GetComponent <EnemyGenerator>();
     object_Generator       = this.gameObject.GetComponent <ObjectCreater>();
     s_move                 = GameObject.FindGameObjectWithTag("Player").GetComponent <S_Move>();
     is_dead_gameManager    = false;
     this.next_step         = STEP.PLAY;
     this.guistyle.fontSize = 30;
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            try
            {
                var             directoryLocation = ConfigurationManager.AppSettings.Get("DirectoryPath");
                List <FileData> filesData         = new FileLoader().GetFilesData(directoryLocation).Result.ToList();

                ObjectCreater objCre  = new ObjectCreater();
                Summary       summObj = new Summary();
                List <File_Info <LP_data> >  LPFileInfo  = new List <File_Info <LP_data> >();
                List <File_Info <TOU_data> > TOUFileInfo = new List <File_Info <TOU_data> >();


                foreach (var filedata in filesData)
                {
                    if (filedata.Type == "LP")
                    {
                        File_Info <LP_data> tempFileInfo = new File_Info <LP_data>();
                        tempFileInfo.Type     = filedata.Type;
                        tempFileInfo.FileName = filedata.FileName;
                        objCre.GetdataObjects <LP_data>(filedata.Data.Split(new[] { Environment.NewLine }, StringSplitOptions.None).ToList(), tempFileInfo).Wait();
                        tempFileInfo.summary = summObj.CalculateFileSummary <LP_data>(20, tempFileInfo.FileDataLP, (x) => x.DataValue);
                        LPFileInfo.Add(tempFileInfo);
                    }
                    else
                    {
                        File_Info <TOU_data> tempFileInfo = new File_Info <TOU_data>();
                        tempFileInfo.Type     = filedata.Type;
                        tempFileInfo.FileName = filedata.FileName;
                        objCre.GetdataObjects <TOU_data>(filedata.Data.Split(new[] { Environment.NewLine }, StringSplitOptions.None).ToList(), tempFileInfo).Wait();
                        tempFileInfo.summary = summObj.CalculateFileSummary <TOU_data>(20, tempFileInfo.FileDataTOU, (x) => x.Energy);;
                        TOUFileInfo.Add(tempFileInfo);
                    }
                }

                DisplayInformation(LPFileInfo, TOUFileInfo);

                System.Console.ReadLine();
            }
            catch (Exception ex)
            {
                System.Console.WriteLine("Application Error Happened : " + ex.Message);
                if (ex.InnerException != null && string.IsNullOrWhiteSpace(ex.InnerException.Message))
                {
                    System.Console.WriteLine("Inner Exception : " + ex.InnerException.Message);
                }
                System.Console.Read();
            }
        }
Ejemplo n.º 3
0
    // Start is called before the first frame update
    void Start()
    {
        HP_Bar = Instantiate(HP_Bar, this.transform.position, Quaternion.identity);
        HP_Bar.transform.Translate(new Vector3(0f, 0.5f, 0f));
        HP_Bar_MaxScale = HP_Bar.transform.localScale.x;

        isStart = false;

        if (this.gameObject.tag != "Base")
        {
            currentHP = 1f;
        }
        else
        {
            currentHP = MaxHP;
        }

        system = GameObject.Find("GameSystem").GetComponent <ObjectCreater>();
    }
Ejemplo n.º 4
0
 public Pool(ObjectCreater objCreater, int maxSize)
 {
     this.objCreater  = objCreater;
     this.maxSize     = maxSize;
     this.freeObjects = new List <T>(maxSize);
 }