//タイルの上に移動 void SetPositionOnTile() { var tilePosition = BattleStage.Instance.GetTile(positionArray).transform.position; CSTransform.SetX(transform, tilePosition.x); CSTransform.SetZ(transform, tilePosition.z); }
//タイルの上に移動 void SetPositionOnTile() { var tilePosition = BBattleStage.Instance.GetTileXAndZPosition(positionArray); CSTransform.SetX(transform, tilePosition.x); CSTransform.SetZ(transform, tilePosition.y); }
//攻撃時カメラ追従 void OnDraggingInAttackMode(DragInfo dragInfo) { if (activeCharacter.IsNowAction() == false) { return; } //x方向 var moveVect = GetMoveDirection(dragInfo.delta); CSTransform.SetX(transform, transform.position.x - moveVect.x); CSTransform.SetZ(transform, transform.position.z - moveVect.y); }
void Update() { // 自分自身の座標に、targetの座標に相対座標を足した値を設定する CSTransform.SetX(transform, target.position.x + offset.x); }
void Clamp() { CSTransform.SetX(transform, Mathf.Clamp(transform.position.x, -x, x)); }