Ejemplo n.º 1
0
 // constructor
 public FlightControl()
 {
     this.speed      = 1;
     this.timestep   = 0;
     this.numLines   = 0;
     this.isReverse  = false;
     this.stop       = true;
     this.pilot      = new SimplePilot();
     this.flightdata = new FlightData();
     this.research   = new Research();
     this.paths      = new PathInfo();
 }
Ejemplo n.º 2
0
    protected override void EntryAdded(GameObject entry, int tier, int entryIndex)
    {
        IResearch research = m_researchManager.AllResearch.FirstOrDefault(x => x.Tier == tier && x.Order == entryIndex);

        ResearchUserControl uc = entry.GetComponent <ResearchUserControl>();

        uc.DataContext = research;

        uc.Name             = research != null ? research.Name : "Empty";
        uc.Description      = research != null ? research.Description : "Non description";
        uc.Cost             = research != null ? research.Cost : 0.0;
        uc.Icon             = GetResearchSprite(research?.Name);
        uc.AmountBought     = research != null ? research.AmountBought : 0;
        uc.MaxAmountAllowed = research != null ? research.MaxAmountAllowed : 1;

        uc.OnBuyResearch += OnPurchaseResearch;
    }
Ejemplo n.º 3
0
 /// <summary>
 /// 构造
 /// </summary>
 /// <param name="_inResearch"></param>
 public InResearchController(IResearch _inResearch)
 {
     _IResearch = _inResearch;
 }
Ejemplo n.º 4
0
 private void OnPurchaseResearch(IResearch research)
 {
     m_researchManager.BuyResearch(research);
     UpdateList();
 }