예제 #1
0
 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
    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));
    }