コード例 #1
0
 public bool AddCanvasGauge(UIGauge newGauge, float maxDisplayableValue, float minDisplayableValue)
 {
     if (newGauge != null)
     {
         newGauge.Build(interfaceCanvasTrans, maxDisplayableValue, minDisplayableValue);
         return(newGauge.WasBuilt());
     }
     return(false);
 }
コード例 #2
0
    private void CreateGauge()
    {
        collectGauge = FindObjectOfType <UIPlantGaugeManager>().CreateGauge();
        collectGauge.GetComponent <UITargetFollow>().SetTarget(transform);
        gauge = collectGauge.GetComponent <UIGauge>();

        gauge.SetGauge(null, 0, plant.gatheringTime, 0);
        collectGauge.SetActive(false);
    }
コード例 #3
0
    private void Start()
    {
        monster = MonsterDB.Instance.FindItem(monsterID);

        dropper.SetDropList(monster.Dropitemid, monster.Droppercent,
                            monster.Mindrop, monster.Maxdrop,
                            monster.Mingold, monster.Maxgold);

        sightChecker.SetSight(monster.Sight + 2f);
        hp = monster.Hp;

        hpGauge = FindObjectOfType <UIMonsterGaugeManager>().CreateGauge();
        hpGauge.GetComponent <UITargetFollow>().SetTarget(transform);
        gauge = hpGauge.GetComponent <UIGauge>();

        gauge.SetGauge(null, 0, hp, hp);

        StartCoroutine(UpdateState());
    }