コード例 #1
0
ファイル: HybridController.cs プロジェクト: IMD-Lab/SlidAR
 void Start()
 {
     currState = AppState.NONE;
     traAIni   = (TranslationAndIntial)gameObject.GetComponent(typeof(TranslationAndIntial));
     orienCont = (OrientationControl)gameObject.GetComponent(typeof(OrientationControl));
     UIFObj    = (UIFollowObject)objCenterIn2D.GetComponent(typeof(UIFollowObject));
 }
コード例 #2
0
    public void Spawn(TankPart entity)
    {
        GameObject     healthBarObject = Instantiate(healthBarPrefab, transform);
        Slider         healthSlider    = healthBarObject.GetComponentInChildren <Slider>();
        UIFollowObject followScript    = healthBarObject.GetComponent <UIFollowObject>();

        followScript.target = entity.transform;

        entity.healthSlider = healthSlider;
    }
コード例 #3
0
ファイル: SlidARPPController.cs プロジェクト: IMD-Lab/SlidAR
    void Awake()
    {
        currState = AppState.NONE;
        traAIni   = (TranslationAndIntial)gameObject.GetComponent(typeof(TranslationAndIntial));
        orienCont = (OrientationControl)gameObject.GetComponent(typeof(OrientationControl));
        slidAR    = (SlidARScript)gameObject.GetComponent(typeof(SlidARScript));
        objectInitialOrientation = 0;

        UIFObj = (UIFollowObject)objCenterIn2D.GetComponent(typeof(UIFollowObject));
    }