Beispiel #1
0
    private void ShowFieldList()
    {
        divImportCase.Style.Add("display", "none");
        this.divCaseFieldsList.Style.Add("display", "block");
        DataSet ds = BLL.CompanyBLL.GetCacheFields(CompanyID, ImportType);

        this.GridCase.DataSource = ds;

        GridCase.DataBind();
        TotalRecord = ds.Tables[0].Rows.Count.ToString();
    }
    void Generate(WaveInfo info)
    {
        GridCase gc = spacePartition.FindSpace (info.depth);

        Enemy enemy = Instantiate (info.prefab).GetComponent<Enemy> ();
        enemy.InitializeEnemy (this, gc.index, planet.transform);
        enemy.transform.position = gc.position;

        // Same as LookAt *Blow my mind*
        enemy.transform.right = planet.transform.position - enemy.transform.position;

        enemy.Generate ();

        remainingSpawn--;
    }
Beispiel #3
0
    void PopulateGrid()
    {
        float stepAngle  = angle / (float)spaceAngleSize;
        float startAngle = -angle / 2 + stepAngle / 2;

        int index = 0;

        for (int d = 0; d < depth; d++)
        {
            for (int i = 0; i < spaceAngleSize; i++, index++)
            {
                GridCase c = new GridCase(index);
                c.position.Set(0f, minDistance + d, 0f);
                c.position = RotateAroundPoint(c.position, planetCenter.position, new Vector3(0f, 0f, startAngle + stepAngle * i));
                grid.Add(c);
            }
        }
    }