コード例 #1
0
ファイル: BIWEntityShould.cs プロジェクト: useit015/explorer
    public void SetRotation()
    {
        //Arrange
        Vector3 startRotation = Vector3.right * 180;

        //Act
        entity.SetRotation(startRotation);

        //Assert
        Assert.AreEqual(startRotation, entity.GetEulerRotation());
    }
コード例 #2
0
    public void UpdateInfo(DCLBuilderInWorldEntity entity)
    {
        if (entity != null && entity.gameObject != null)
        {
            Vector3 positionConverted = WorldStateUtils.ConvertUnityToScenePosition(entity.gameObject.transform.position, parcelScene);
            Vector3 currentRotation   = entity.gameObject.transform.rotation.eulerAngles;
            Vector3 currentScale      = entity.gameObject.transform.localScale;

            currentRotation = entity.GetEulerRotation();

            entityInformationView.SetPositionAttribute(positionConverted);
            entityInformationView.SetRotationAttribute(currentRotation);
            entityInformationView.SetScaleAttribute(currentScale);
        }
    }